diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index dd785f91..608ec378 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -157,3 +157,37 @@ function trash() { function vncviewer() { open vnc://$@ } + +# iTunes control function +function itunes() { + local opt=$1 + shift + case "$opt" in + launch|play|pause|stop|rewind|resume|quit) + ;; + mute) + opt="set mute to true" + ;; + unmute) + opt="set mute to false" + ;; + next|previous) + opt="$opt track" + ;; + ""|-h|--help) + echo "Usage: itunes