mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
The `killall` command doesn't come shipped in all distributions (Void Linux as an example), on the other hand `pkill` does. Unsure what the exact intention on each call is but the `-9` signal can be replaced with `-x` if the intention is not to end all instances. Also note that I left `pkill -x Xorg` without the `-9` signal because for some reason it won't function as expected and end up halting the system (at least on Void Linux).
13 lines
542 B
Bash
Executable File
13 lines
542 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# If transmission-daemon is running, will ask to kill, else will ask to start.
|
|
|
|
if pidof transmission-daemon >/dev/null ;
|
|
then
|
|
[ "$(printf "No\\nYes" | dmenu -i -p "Turn off transmission-daemon?")" = "Yes" ] && pkill -9 transmission-da && notify-send "transmission-daemon disabled."
|
|
else
|
|
ifinstalled transmission-cli || exit
|
|
[ "$(printf "No\\nYes" | dmenu -i -p "Turn on transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send "tranmission-daemon enabled."
|
|
fi
|
|
sleep 3 && pkill -RTMIN+7 "${STATUSBAR:-dwmblocks}"
|