dotfiles

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

commit 9ddf765a03fae63892644d11bb48112daeaf528a
parent 151e47c6295f2060e5cf18253cbfae24e74359bf
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Sat, 26 Jan 2019 18:13:36 -0500

torrent wrap and other changes

Diffstat:
M.config/i3/config | 2+-
M.scripts/i3cmds/td-toggle | 13++++---------
A.scripts/i3cmds/torwrap | 6++++++
3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/.config/i3/config b/.config/i3/config @@ -286,7 +286,7 @@ bindsym $mod+F2 restart bindsym $mod+F3 exec --no-startup-id displayselect bindsym $mod+F4 exec --no-startup-id prompt "Hibernate computer?" "$hibernate" 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 torwrap 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 diff --git a/.scripts/i3cmds/td-toggle b/.scripts/i3cmds/td-toggle @@ -1,15 +1,10 @@ #!/bin/sh - # If transmission-daemon is running, will ask to kill, else will ask to start. - -[ ! -f /usr/bin/transmission-daemon ] && notify-send "Transmission daemon not installed." && exit - -if pgrep -x transmission-da >/dev/null ; +if pgrep -x transmission-da >/dev/null ; then - yn=$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?") - [ "$yn" = "Yes" ] && killall transmission-da + [ "$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?")" = "Yes" ] && killall transmission-da && notify-send -i "$PIX/torrent.svg" "transmission-daemon killed." else - yn=$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?") - [ "$yn" = "Yes" ] && transmission-daemon + ifinstalled transmission-cli || exit + [ "$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send -i "$PIX/torrent.svg" "tranmission-daemon started." fi sleep 3 && pkill -RTMIN+7 i3blocks diff --git a/.scripts/i3cmds/torwrap b/.scripts/i3cmds/torwrap @@ -0,0 +1,6 @@ +#!/bin/sh +ifinstalled transmission-remote-cli transmission-cli || exit + +! pgrep -x transmission-da >/dev/null && transmission-daemon && notify-send -i "$PIX/torrent.svg" "Starting torrent daemon..." && sleep 3 && pkill -RTMIN+7 i3blocks + +$TERMINAL -e transmission-remote-cli