Added tabs so as to not make pull request so large

This commit is contained in:
Ian Walker 2015-06-15 22:31:58 +09:00
commit d30ea9d80c

View file

@ -161,16 +161,16 @@ function itunes() {
vol) vol)
opt="set sound volume to $1" #$1 Due to the shift opt="set sound volume to $1" #$1 Due to the shift
;; ;;
status|nowplaying) status|nowplaying)
local state=`osascript -e 'tell application "iTunes" to player state as string'` local state=`osascript -e 'tell application "iTunes" to player state as string'`
echo "iTunes is currently $state" echo "iTunes is currently $state"
if [ "$state" = "playing" ]; then if [ "$state" = "playing" ]; then
artist=`osascript -e 'tell application "iTunes" to artist of current track as string'` artist=`osascript -e 'tell application "iTunes" to artist of current track as string'`
track=`osascript -e 'tell application "iTunes" to name of current track as string'` track=`osascript -e 'tell application "iTunes" to name of current track as string'`
echo "Current track: $artist / $track"; echo "Current track: $artist / $track";
fi fi
return 0 return 0
;; ;;
shuf|shuff|shuffle) shuf|shuff|shuffle)
# The shuffle property of current playlist can't be changed in iTunes 12, # The shuffle property of current playlist can't be changed in iTunes 12,
# so this workaround uses AppleScript to simulate user input instead. # so this workaround uses AppleScript to simulate user input instead.