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

t-daemon-toggle (392B)


      1 #!/bin/sh
      2 [ ! -f /usr/bin/transmission-daemon ] && notify-send "${0##/*}" "Transmission daemon not installed." && exit
      3 
      4 if  pgrep transmission-da >/dev/null; then
      5 	yn=$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?")
      6 	[ "$yn" = "Yes" ] && pkill transmission-da
      7 else
      8 	yn=$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")
      9 	[ "$yn" = "Yes" ] && transmission-daemon
     10 fi