diff options
Diffstat (limited to 'audio/pianobar/pianobarctl')
-rw-r--r-- | audio/pianobar/pianobarctl | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/audio/pianobar/pianobarctl b/audio/pianobar/pianobarctl index ccc99d07a5..619ff0c5a0 100644 --- a/audio/pianobar/pianobarctl +++ b/audio/pianobar/pianobarctl @@ -4,7 +4,10 @@ # This script uses a specified named pipe (FIFO) to control pianobar. # Written by Phillip Warner -VERSION=0.1 +VERSION=0.2 +# - Updated for new play and "stop" (pause only) controls +# added to pianobar starting at version 2013.05.19 +# - Added quit option # This is the FIFO that is used to control pianobar # It must exist before running pianobar in order for remote control to work @@ -13,8 +16,11 @@ PIANOBARCTL=~/.config/pianobar/ctl # Control Functions NEXT="n" PLAYPAUSE="p" +PLAY="P" +PAUSE="S" LOVE="+" BAN="-" +QUIT="q" set -e @@ -26,10 +32,12 @@ usage() { echo "The script's parameters are:" echo " -h, --help Help" echo " -n, --next Play Next" - echo " -p, --pause Play / Pause" - echo " -x, --play Play / Pause" + echo " -p, --pause Toggle Play / Pause" + echo " -x, --play Play" + echo " -v, --stop Pause" echo " -l, --love Love Song" echo " -b, --ban Ban Song" + echo " -q, --quit Quit Program" echo echo "Current pianobar PIDs (euid=$(id -u)):" pgrep -u $(id -u) pianobar$ @@ -55,12 +63,16 @@ then ;; -p|--pause ) echo -n $PLAYPAUSE > $PIANOBARCTL ;; - -x|--play ) echo -n $PLAYPAUSE > $PIANOBARCTL + -x|--play ) echo -n $PLAY > $PIANOBARCTL + ;; + -v|--stop ) echo -n $PAUSE > $PIANOBARCTL ;; -l|--love ) echo -n $LOVE > $PIANOBARCTL ;; -b|--ban ) echo -n $BAN > $PIANOBARCTL ;; + -q|--quit ) echo -n $QUIT > $PIANOBARCTL + ;; * ) usage ;; esac |