mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-20 03:13:33 +01:00
Added tabs so as to not make pull request so large
This commit is contained in:
parent
b66be3a580
commit
d30ea9d80c
1 changed files with 10 additions and 10 deletions
|
|
@ -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.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue