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
3de0235a
Commit
3de0235a
authored
Sep 30, 2016
by
Manuel Hutter
Committed by
Marc Cornellà
Sep 30, 2016
Browse files
Add missing newline to end of `spotify status` output (#5480)
parent
c713407f
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/osx/osx.plugin.zsh
View file @
3de0235a
...
@@ -314,7 +314,7 @@ function spotify() {
...
@@ -314,7 +314,7 @@ function spotify() {
position
=
$(
osascript
-e
'tell application "Spotify" to player position as string'
|
tr
','
'.'
)
;
position
=
$(
osascript
-e
'tell application "Spotify" to player position as string'
|
tr
','
'.'
)
;
position
=
$(
echo
"scale=2;
$position
/ 60"
| bc |
awk
'{printf "%0.2f", $0}'
)
;
position
=
$(
echo
"scale=2;
$position
/ 60"
| bc |
awk
'{printf "%0.2f", $0}'
)
;
printf
"
$reset
""Artist: %s
\n
Album: %s
\n
Track: %s
\n
Position: %s / %s"
"
$artist
"
"
$album
"
"
$track
"
"
$position
"
"
$duration
"
;
printf
"
$reset
""Artist: %s
\n
Album: %s
\n
Track: %s
\n
Position: %s / %s
\n
"
"
$artist
"
"
$album
"
"
$track
"
"
$position
"
"
$duration
"
;
fi
fi
}
}
...
@@ -412,17 +412,17 @@ function spotify() {
...
@@ -412,17 +412,17 @@ function spotify() {
osascript
-e
'tell application "Spotify" to playpause'
;
osascript
-e
'tell application "Spotify" to playpause'
;
break
;;
break
;;
"quit"
)
"quit"
)
cecho
"Quitting Spotify."
;
cecho
"Quitting Spotify."
;
osascript
-e
'tell application "Spotify" to quit'
;
osascript
-e
'tell application "Spotify" to quit'
;
exit
1
;;
exit
1
;;
"next"
)
"next"
)
cecho
"Going to next track."
;
cecho
"Going to next track."
;
osascript
-e
'tell application "Spotify" to next track'
;
osascript
-e
'tell application "Spotify" to next track'
;
break
;;
break
;;
"prev"
)
"prev"
)
cecho
"Going to previous track."
;
cecho
"Going to previous track."
;
osascript
-e
'tell application "Spotify" to previous track'
;
osascript
-e
'tell application "Spotify" to previous track'
;
break
;;
break
;;
...
...
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