use STATUSBAR variable safely
This commit is contained in:
parent
499e222fd7
commit
3a91dc30f2
8 changed files with 10 additions and 10 deletions
|
@ -8,7 +8,7 @@ notify-send "📦 Repository Sync" "Checking for package updates..."
|
||||||
sudo pacman -Syyuw --noconfirm || notify-send "Error downloading 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."
|
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\]"
|
if pacman -Qu | grep -v "\[ignored\]"
|
||||||
then
|
then
|
||||||
|
|
|
@ -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
|
pgrep -x newsboat >/dev/null && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit
|
||||||
|
|
||||||
echo 🔃 > /tmp/newsupdate
|
echo 🔃 > /tmp/newsupdate
|
||||||
pkill -RTMIN+6 i3blocks
|
pkill -RTMIN+6 "${STATUSBAR:?}"
|
||||||
/usr/bin/newsboat -x reload
|
/usr/bin/newsboat -x reload
|
||||||
rm -f /tmp/newsupdate
|
rm -f /tmp/newsupdate
|
||||||
pkill -RTMIN+6 i3blocks
|
pkill -RTMIN+6 "${STATUSBAR:?}"
|
||||||
/usr/bin/notify-send "📰 RSS feed update complete."
|
/usr/bin/notify-send "📰 RSS feed update complete."
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
updateicon() { \
|
updateicon() { \
|
||||||
echo "$1" > /tmp/recordingicon
|
echo "$1" > /tmp/recordingicon
|
||||||
pkill -RTMIN+9 i3blocks
|
pkill -RTMIN+9 "${STATUSBAR:?}"
|
||||||
}
|
}
|
||||||
|
|
||||||
killrecording() {
|
killrecording() {
|
||||||
|
@ -20,7 +20,7 @@ killrecording() {
|
||||||
kill -15 "$recpid"
|
kill -15 "$recpid"
|
||||||
rm -f /tmp/recordingpid
|
rm -f /tmp/recordingpid
|
||||||
updateicon ""
|
updateicon ""
|
||||||
pkill -RTMIN+9 i3blocks
|
pkill -RTMIN+9 "${STATUSBAR:?}"
|
||||||
# even after SIGTERM, ffmpeg may still run, so SIGKILL it.
|
# even after SIGTERM, ffmpeg may still run, so SIGKILL it.
|
||||||
sleep 3
|
sleep 3
|
||||||
kill -9 "$recpid"
|
kill -9 "$recpid"
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
# This loop will update the mpd statusbar module whenever a command changes the
|
# 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.
|
# music player's status. mpd must be running on X's start for this to work.
|
||||||
while : ; do
|
while : ; do
|
||||||
mpc idle >/dev/null && pkill -RTMIN+11 dwmblocks || break
|
mpc idle >/dev/null && pkill -RTMIN+11 "${STATUSBAR:?}" || break
|
||||||
done
|
done
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
printf "Beginning upgrade.\\n"
|
printf "Beginning upgrade.\\n"
|
||||||
|
|
||||||
yay -Syu
|
yay -Syu
|
||||||
pkill -RTMIN+8 i3blocks
|
pkill -RTMIN+8 "${STATUSBAR:?}"
|
||||||
|
|
||||||
printf "\\nUpgrade complete.\\nPress <Enter> to exit window.\\n\\n"
|
printf "\\nUpgrade complete.\\nPress <Enter> to exit window.\\n\\n"
|
||||||
read -r
|
read -r
|
||||||
|
|
|
@ -7,4 +7,4 @@ else
|
||||||
ifinstalled transmission-cli || exit
|
ifinstalled transmission-cli || exit
|
||||||
[ "$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send "tranmission-daemon started."
|
[ "$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send "tranmission-daemon started."
|
||||||
fi
|
fi
|
||||||
sleep 3 && pkill -RTMIN+7 i3blocks
|
sleep 3 && pkill -RTMIN+7 "${STATUSBAR:?}"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
ifinstalled transmission-remote-cli transmission-cli || exit
|
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
|
$TERMINAL -e transmission-remote-cli
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
|
|
||||||
# transmission-daemon sometimes fails to take remote requests in its first moments.
|
# 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."
|
transmission-remote -a "$@" && notify-send "🔽 Torrent added."
|
||||||
|
|
Loading…
Reference in a new issue