dotfiles

My dotfiles used for LARBS
Log | Files | Refs | README | LICENSE

td-toggle (529B)


      1 #!/usr/bin/env sh
      2 # If transmission-daemon is running, will ask to kill, else will ask to start.
      3 if pgrep -x transmission-da >/dev/null ;
      4 then
      5 	[ "$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?")" = "Yes" ] && killall transmission-da && notify-send "transmission-daemon killed."
      6 else
      7 	ifinstalled transmission-cli || exit
      8 	[ "$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send "tranmission-daemon started."
      9 fi
     10 sleep 3 && pkill -RTMIN+7 "${STATUSBAR:?}"