2020-02-08 18:43:37 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
2018-09-15 09:11:24 -04:00
|
|
|
# If transmission-daemon is running, will ask to kill, else will ask to start.
|
2020-04-11 10:03:33 -04:00
|
|
|
if ps ax | grep -q "\stransmission-daemon$" ;
|
2018-09-15 09:11:24 -04:00
|
|
|
then
|
2019-03-20 14:45:08 -04:00
|
|
|
[ "$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?")" = "Yes" ] && killall transmission-da && notify-send "transmission-daemon killed."
|
2018-09-15 09:11:24 -04:00
|
|
|
else
|
2019-01-26 18:13:36 -05:00
|
|
|
ifinstalled transmission-cli || exit
|
2019-03-20 14:45:08 -04:00
|
|
|
[ "$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send "tranmission-daemon started."
|
2018-09-15 09:11:24 -04:00
|
|
|
fi
|
2020-04-10 22:53:45 -04:00
|
|
|
sleep 3 && pkill -RTMIN+7 "${STATUSBAR:-dwmblocks}"
|