diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2019-05-19 20:05:14 -0400 |
|---|---|---|
| committer | Luke Smith <luke@lukesmith.xyz> | 2019-05-19 20:05:14 -0400 |
| commit | c6e69e96421ebf192eb6de537324e269e7bfda78 (patch) | |
| tree | 47d34a5ff72d65be9a3e2c6aeb55a88da3a6fbd2 /.local/bin/td-toggle | |
| parent | bf8c6b1e20f42a7725d8d919830fdb274596b20f (diff) | |
| download | eibhear-c6e69e96421ebf192eb6de537324e269e7bfda78.tar.gz eibhear-c6e69e96421ebf192eb6de537324e269e7bfda78.tar.zst eibhear-c6e69e96421ebf192eb6de537324e269e7bfda78.zip | |
massive cleanup
Diffstat (limited to '.local/bin/td-toggle')
| -rwxr-xr-x | .local/bin/td-toggle | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.local/bin/td-toggle b/.local/bin/td-toggle new file mode 100755 index 0000000..dc727b9 --- /dev/null +++ b/.local/bin/td-toggle @@ -0,0 +1,10 @@ +#!/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 "transmission-daemon killed." +else + ifinstalled transmission-cli || exit + [ "$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send "tranmission-daemon started." +fi +sleep 3 && pkill -RTMIN+7 i3blocks |
