Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adds itunes vol command.

Adds itunes vol, which takes an argument from 0 to 100 to set the
volume from the shell.
  • Loading branch information...
commit b7f51bbbdd9f0d9ff9ef59b559e91b916d53cdf1 1 parent 3913106
@jbdatko jbdatko authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 plugins/osx/osx.plugin.zsh
View
5 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"
}
-
Please sign in to comment.
Something went wrong with that request. Please try again.