summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Bateman <andy@andybateman.com>2015-09-17 19:12:35 +1200
committerAndy Bateman <andy@andybateman.com>2015-09-22 08:15:31 +1200
commit993e09cc6b6127be92afe072f5957e4e9e72367f (patch)
treeee56aa9408b0461815d2955676c7b836ff91ca33
parent9f2acdc445f05e6556cf6180a1edd52b6939bbcc (diff)
downloadzsh-993e09cc6b6127be92afe072f5957e4e9e72367f.tar.gz
zsh-993e09cc6b6127be92afe072f5957e4e9e72367f.tar.bz2
zsh-993e09cc6b6127be92afe072f5957e4e9e72367f.zip
Added function for 'itunes playing' to display state when not playing
-rw-r--r--plugins/osx/osx.plugin.zsh4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh
index 859e08da5..9413f5056 100644
--- a/plugins/osx/osx.plugin.zsh
+++ b/plugins/osx/osx.plugin.zsh
@@ -167,6 +167,8 @@ function itunes() {
currenttrack=`osascript -e 'tell application "iTunes" to name of current track as string'`
currentartist=`osascript -e 'tell application "iTunes" to artist of current track as string'`
print -P "Listening to %F{yellow}$currenttrack%f by %F{yellow}$currentartist%f";
+ else
+ print "iTunes is" $state;
fi
return 0
;;
@@ -208,7 +210,7 @@ EOF
echo "\tnext|previous\tplay next or previous track"
echo "\tshuf|shuffle [on|off|toggle]\tSet shuffled playback. Default: toggle. Note: toggle doesn't support the MiniPlayer."
echo "\tvol\tSet the volume, takes an argument from 0 to 100"
- echo "\tplaying\tShow what song is currently playing in iTunes."
+ echo "\tplaying|status\tShow what song is currently playing in iTunes."
echo "\thelp\tshow this message and exit"
return 0
;;