transmission-daemon toggle script
This commit is contained in:
parent
9c2aa14ac2
commit
4e34c50b93
2 changed files with 14 additions and 1 deletions
|
@ -292,7 +292,7 @@ bindsym $mod+F3 exec --no-startup-id displayselect
|
||||||
bindsym $mod+F4 exec --no-startup-id $hibernate
|
bindsym $mod+F4 exec --no-startup-id $hibernate
|
||||||
bindsym $mod+F5 exec --no-startup-id $netrefresh
|
bindsym $mod+F5 exec --no-startup-id $netrefresh
|
||||||
bindsym $mod+F6 exec --no-startup-id $term -e transmission-remote-cli
|
bindsym $mod+F6 exec --no-startup-id $term -e transmission-remote-cli
|
||||||
##bindsym $mod+F7
|
bindsym $mod+F7 exec --no-startup-id td-toggle
|
||||||
bindsym $mod+F8 exec --no-startup-id ~/.config/mutt/etc/mailsync.sh
|
bindsym $mod+F8 exec --no-startup-id ~/.config/mutt/etc/mailsync.sh
|
||||||
bindsym $mod+F9 exec --no-startup-id dmenumount
|
bindsym $mod+F9 exec --no-startup-id dmenumount
|
||||||
bindsym $mod+F10 exec --no-startup-id dmenuumount
|
bindsym $mod+F10 exec --no-startup-id dmenuumount
|
||||||
|
|
13
.scripts/td-toggle
Executable file
13
.scripts/td-toggle
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# If transmission-daemon is running, will ask to kill, else will ask to start.
|
||||||
|
|
||||||
|
if pgrep -x transmission-da ;
|
||||||
|
then
|
||||||
|
yn=$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?")
|
||||||
|
[ "$yn" = "Yes" ] && killall transmission-daemon
|
||||||
|
else
|
||||||
|
yn=$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")
|
||||||
|
[ "$yn" = "Yes" ] && transmission-daemon
|
||||||
|
fi
|
||||||
|
sleep 3 && pkill -RTMIN+7 i3blocks
|
Loading…
Reference in a new issue