Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
9f2acdc4
Commit
9f2acdc4
authored
9 years ago
by
Andy Bateman
Browse files
Options
Download
Email Patches
Plain Diff
You can now use 'itunes status' as well as 'itunes playing' to show current track
parent
29db0e01
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/osx/osx.plugin.zsh
+2
-2
plugins/osx/osx.plugin.zsh
with
2 additions
and
2 deletions
+2
-2
plugins/osx/osx.plugin.zsh
View file @
9f2acdc4
...
...
@@ -161,9 +161,9 @@ function itunes() {
vol
)
opt
=
"set sound volume to
$1
"
#$1 Due to the shift
;;
playing
)
playing
|status
)
local
state
=
`
osascript
-e
'tell application "iTunes" to player state as string'
`
if
[
"
$state
"
=
"playing"
]
;
then
if
[
[
"
$state
"
=
"playing"
]
]
;
then
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"
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help