dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 4e34c50b93b571493c63abb9c506612d00e01b92
parent 9c2aa14ac25531ef234927b1d418ad4453b3bc0a
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Sat, 15 Sep 2018 09:11:24 -0400

transmission-daemon toggle script

Diffstat:
M.config/i3/config | 2+-
A.scripts/td-toggle | 13+++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)

diff --git 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 @@ -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