mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-27 03:14:56 +01:00
Cleaned up the code a bit
This commit is contained in:
parent
a1e0ca9c88
commit
6570870828
1 changed files with 4 additions and 4 deletions
|
|
@ -161,10 +161,10 @@ 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)
|
status|nowplaying)
|
||||||
its_status=`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 $its_status"
|
echo "iTunes is currently $state"
|
||||||
if [ "$its_status" = "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";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue