diff options
author | Biswakalyan Bhuyan <biswa@surgot.in> | 2022-09-24 12:21:56 +0530 |
---|---|---|
committer | Biswakalyan Bhuyan <biswa@surgot.in> | 2022-09-24 12:21:56 +0530 |
commit | 86f99da8d08e1f2e290d8ebfd5adb016faff7bac (patch) | |
tree | 8f121a2aaa187d8266e20df23ad36262ab051866 /td-toggle | |
download | bin-86f99da8d08e1f2e290d8ebfd5adb016faff7bac.tar.gz bin-86f99da8d08e1f2e290d8ebfd5adb016faff7bac.tar.bz2 bin-86f99da8d08e1f2e290d8ebfd5adb016faff7bac.zip |
script's
Diffstat (limited to 'td-toggle')
-rwxr-xr-x | td-toggle | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/td-toggle b/td-toggle new file mode 100755 index 0000000..3c20ea1 --- /dev/null +++ b/td-toggle @@ -0,0 +1,12 @@ +#!/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}" |