Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
96d57dc3
Commit
96d57dc3
authored
Aug 31, 2016
by
mahi97
Browse files
change pause to play/pause
parent
2a5321f4
Changes
1
Show whitespace changes
Inline
Side-by-side
plugins/osx/osx.plugin.zsh
View file @
96d57dc3
...
@@ -335,8 +335,14 @@ function spotify() {
...
@@ -335,8 +335,14 @@ function spotify() {
break
;;
break
;;
"pause"
)
"pause"
)
state
=
$(
osascript
-e
'tell application "Spotify" to player state as string'
)
;
if
[
"
$state
"
=
"playing"
]
;
then
cecho
"Pausing Spotify."
;
cecho
"Pausing Spotify."
;
osascript
-e
'tell application "Spotify" to pause'
;
else
cecho
"Playing Spotify."
;
fi
osascript
-e
'tell application "Spotify" to playpause'
;
break
;;
break
;;
"quit"
)
"quit"
)
...
...
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