voidrice/.local/bin/td-toggle
bboudreaux28 5e53f5f467
fixed typo (#940)
changed "tranmission" to "transmission"
2021-04-24 17:40:33 -04:00

12 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" ] && killall 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 "transmission-daemon enabled."
fi
sleep 3 && pkill -RTMIN+7 "${STATUSBAR:-dwmblocks}"