summaryrefslogtreecommitdiffstats
path: root/.local/bin
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2019-11-24 08:10:31 -0500
committerLuke Smith <luke@lukesmith.xyz>2019-11-24 08:10:31 -0500
commit3a91dc30f24b66056503220d35c80aa3bba74fe8 (patch)
tree7bdfcf9368162aad015dab8e54b5cd56583a5286 /.local/bin
parent499e222fd702737d06fd2ff3bb21553ca96ec862 (diff)
downloadeibhear-3a91dc30f24b66056503220d35c80aa3bba74fe8.tar.gz
eibhear-3a91dc30f24b66056503220d35c80aa3bba74fe8.tar.zst
eibhear-3a91dc30f24b66056503220d35c80aa3bba74fe8.zip
use STATUSBAR variable safely
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/cron/checkup2
-rwxr-xr-x.local/bin/cron/newsup4
-rwxr-xr-x.local/bin/dmenurecord4
-rwxr-xr-x.local/bin/mpd-module-update2
-rwxr-xr-x.local/bin/statusbar/popupgrade2
-rwxr-xr-x.local/bin/td-toggle2
-rwxr-xr-x.local/bin/torwrap2
-rwxr-xr-x.local/bin/transadd2
8 files changed, 10 insertions, 10 deletions
diff --git a/.local/bin/cron/checkup b/.local/bin/cron/checkup
index 927b9d8..ebcdd2a 100755
--- 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
index 6b6a348..1238754 100755
--- 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
index 842376e..7e80f3c 100755
--- 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
index a2bae48..85eb002 100755
--- 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
index fffa399..099b259 100755
--- 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
index d4669ad..4178eed 100755
--- 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
index 16c131f..becd217 100755
--- 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
index cf9450e..cd9f8aa 100755
--- 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."