2018-09-15 13:11:24 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# If transmission-daemon is running, will ask to kill, else will ask to start.
|
2019-01-26 23:13:36 +00:00
|
|
|
if pgrep -x transmission-da >/dev/null ;
|
2018-09-15 13:11:24 +00:00
|
|
|
then
|
2019-01-26 23:13:36 +00:00
|
|
|
[ "$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?")" = "Yes" ] && killall transmission-da && notify-send -i "$PIX/torrent.svg" "transmission-daemon killed."
|
2018-09-15 13:11:24 +00:00
|
|
|
else
|
2019-01-26 23:13:36 +00:00
|
|
|
ifinstalled transmission-cli || exit
|
|
|
|
[ "$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send -i "$PIX/torrent.svg" "tranmission-daemon started."
|
2018-09-15 13:11:24 +00:00
|
|
|
fi
|
|
|
|
sleep 3 && pkill -RTMIN+7 i3blocks
|