summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Datko <jbdatko@gmail.com>2014-05-27 10:34:03 -0600
committerJosh Datko <jbdatko@gmail.com>2014-05-27 10:34:03 -0600
commitb7f51bbbdd9f0d9ff9ef59b559e91b916d53cdf1 (patch)
tree6447db1875bd08451dd99935c4980128179fa3c4
parent3913106b2e7127d396f27b652df812340ec0c871 (diff)
downloadzsh-b7f51bbbdd9f0d9ff9ef59b559e91b916d53cdf1.tar.gz
zsh-b7f51bbbdd9f0d9ff9ef59b559e91b916d53cdf1.tar.bz2
zsh-b7f51bbbdd9f0d9ff9ef59b559e91b916d53cdf1.zip
Adds itunes vol command.
Adds itunes vol, which takes an argument from 0 to 100 to set the volume from the shell.
-rw-r--r--plugins/osx/osx.plugin.zsh5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh
index 63760b5ff..a63f0ee05 100644
--- a/plugins/osx/osx.plugin.zsh
+++ b/plugins/osx/osx.plugin.zsh
@@ -174,12 +174,16 @@ function itunes() {
next|previous)
opt="$opt track"
;;
+ vol)
+ opt="set sound volume to $1" #$1 Due to the shift
+ ;;
""|-h|--help)
echo "Usage: itunes <option>"
echo "option:"
echo "\tlaunch|play|pause|stop|rewind|resume|quit"
echo "\tmute|unmute\tcontrol volume set"
echo "\tnext|previous\tplay next or previous track"
+ echo "\tvol\tSet the volume, takes an argument from 0 to 100"
echo "\thelp\tshow this message and exit"
return 0
;;
@@ -190,4 +194,3 @@ function itunes() {
esac
osascript -e "tell application \"iTunes\" to $opt"
}
-