10 lines
557 B
Bash
Executable file
10 lines
557 B
Bash
Executable file
#!/bin/sh
|
|
# If transmission-daemon is running, will ask to kill, else will ask to start.
|
|
if pgrep -x transmission-da >/dev/null ;
|
|
then
|
|
[ "$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?")" = "Yes" ] && killall transmission-da && notify-send -i "$PIX/torrent.svg" "transmission-daemon killed."
|
|
else
|
|
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."
|
|
fi
|
|
sleep 3 && pkill -RTMIN+7 i3blocks
|