dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit fa39b268425f7e5924c832f0a2c9a2be0e392a47
parent b9f8d64dac5c66ae1d0ab3755df47d5bf0486501
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Mon, 13 Jan 2020 09:18:44 +0100

Update transmission toggle script

Diffstat:
M.local/bin/t-daemon-toggle | 9++-------
1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/.local/bin/t-daemon-toggle b/.local/bin/t-daemon-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 "${0##/*}" "Transmission daemon not installed." && exit -if pgrep -x transmission-da >/dev/null ; -then +if pgrep transmission-da >/dev/null; then yn=$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?") - [ "$yn" = "Yes" ] && killall transmission-da + [ "$yn" = "Yes" ] && pkill transmission-da else yn=$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?") [ "$yn" = "Yes" ] && transmission-daemon fi -#sleep 3 && pkill -RTMIN+16 i3blocks