dotfiles

My dotfiles used for LARBS
Log | Files | Refs | README | LICENSE

commit 3a91dc30f24b66056503220d35c80aa3bba74fe8
parent 499e222fd702737d06fd2ff3bb21553ca96ec862
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Sun, 24 Nov 2019 08:10:31 -0500

use STATUSBAR variable safely

Diffstat:
M.local/bin/cron/checkup | 2+-
M.local/bin/cron/newsup | 4++--
M.local/bin/dmenurecord | 4++--
M.local/bin/mpd-module-update | 2+-
M.local/bin/statusbar/popupgrade | 2+-
M.local/bin/td-toggle | 2+-
M.local/bin/torwrap | 2+-
M.local/bin/transadd | 2+-
8 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/.local/bin/cron/checkup b/.local/bin/cron/checkup @@ -8,7 +8,7 @@ notify-send "📦 Repository Sync" "Checking for package updates..." sudo pacman -Syyuw --noconfirm || notify-send "Error downloading updates. Check your internet connection, if pacman is already running, or run update manually to see errors." -pkill -RTMIN+8 i3blocks +pkill -RTMIN+8 "${STATUSBAR:?}" if pacman -Qu | grep -v "\[ignored\]" then diff --git a/.local/bin/cron/newsup b/.local/bin/cron/newsup @@ -9,8 +9,8 @@ ping -q -c 1 1.1.1.1 > /dev/null || exit pgrep -x newsboat >/dev/null && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit echo 🔃 > /tmp/newsupdate -pkill -RTMIN+6 i3blocks +pkill -RTMIN+6 "${STATUSBAR:?}" /usr/bin/newsboat -x reload rm -f /tmp/newsupdate -pkill -RTMIN+6 i3blocks +pkill -RTMIN+6 "${STATUSBAR:?}" /usr/bin/notify-send "📰 RSS feed update complete." diff --git a/.local/bin/dmenurecord b/.local/bin/dmenurecord @@ -11,7 +11,7 @@ updateicon() { \ echo "$1" > /tmp/recordingicon - pkill -RTMIN+9 i3blocks + pkill -RTMIN+9 "${STATUSBAR:?}" } killrecording() { @@ -20,7 +20,7 @@ killrecording() { kill -15 "$recpid" rm -f /tmp/recordingpid updateicon "" - pkill -RTMIN+9 i3blocks + pkill -RTMIN+9 "${STATUSBAR:?}" # even after SIGTERM, ffmpeg may still run, so SIGKILL it. sleep 3 kill -9 "$recpid" diff --git a/.local/bin/mpd-module-update b/.local/bin/mpd-module-update @@ -3,5 +3,5 @@ # This loop will update the mpd statusbar module whenever a command changes the # music player's status. mpd must be running on X's start for this to work. while : ; do - mpc idle >/dev/null && pkill -RTMIN+11 dwmblocks || break + mpc idle >/dev/null && pkill -RTMIN+11 "${STATUSBAR:?}" || break done diff --git a/.local/bin/statusbar/popupgrade b/.local/bin/statusbar/popupgrade @@ -3,7 +3,7 @@ printf "Beginning upgrade.\\n" yay -Syu -pkill -RTMIN+8 i3blocks +pkill -RTMIN+8 "${STATUSBAR:?}" printf "\\nUpgrade complete.\\nPress <Enter> to exit window.\\n\\n" read -r diff --git a/.local/bin/td-toggle b/.local/bin/td-toggle @@ -7,4 +7,4 @@ else ifinstalled transmission-cli || exit [ "$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send "tranmission-daemon started." fi -sleep 3 && pkill -RTMIN+7 i3blocks +sleep 3 && pkill -RTMIN+7 "${STATUSBAR:?}" diff --git a/.local/bin/torwrap b/.local/bin/torwrap @@ -1,6 +1,6 @@ #!/usr/bin/env sh ifinstalled transmission-remote-cli transmission-cli || exit -! pgrep -x transmission-da >/dev/null && transmission-daemon && notify-send "Starting torrent daemon..." && sleep 3 && pkill -RTMIN+7 i3blocks +! pgrep -x transmission-da >/dev/null && transmission-daemon && notify-send "Starting torrent daemon..." && sleep 3 && pkill -RTMIN+7 "${STATUSBAR:?}" $TERMINAL -e transmission-remote-cli diff --git a/.local/bin/transadd b/.local/bin/transadd @@ -4,6 +4,6 @@ # transmission-daemon sometimes fails to take remote requests in its first moments. -pgrep -x transmission-da || (transmission-daemon && notify-send "Starting transmission daemon..." && sleep 3 && pkill -RTMIN+7 i3blocks) +pgrep -x transmission-da || (transmission-daemon && notify-send "Starting transmission daemon..." && sleep 3 && pkill -RTMIN+7 "${STATUSBAR:?}") transmission-remote -a "$@" && notify-send "🔽 Torrent added."