td-toggle (543B)
1 #!/bin/sh 2 3 # If transmission-daemon is running, will ask to kill, else will ask to start. 4 5 if pidof transmission-daemon >/dev/null ; 6 then 7 [ "$(printf "No\\nYes" | wmenu -i -p "Turn off transmission-daemon?")" = "Yes" ] && killall transmission-daemon && notify-send "transmission-daemon disabled." 8 else 9 ifinstalled transmission-cli || exit 10 [ "$(printf "No\\nYes" | wmenu -i -p "Turn on transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send "transmission-daemon enabled." 11 fi 12 sleep 3 && pkill -RTMIN+7 "${STATUSBAR:-waybar}"