diff --git a/.config/i3/config b/.config/i3/config index 7ae2e63..0b24cdf 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -292,7 +292,7 @@ bindsym $mod+F3 exec --no-startup-id displayselect bindsym $mod+F4 exec --no-startup-id $hibernate bindsym $mod+F5 exec --no-startup-id $netrefresh 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+F9 exec --no-startup-id dmenumount bindsym $mod+F10 exec --no-startup-id dmenuumount diff --git a/.scripts/td-toggle b/.scripts/td-toggle new file mode 100755 index 0000000..42b5f1f --- /dev/null +++ b/.scripts/td-toggle @@ -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