mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-29 01:00:08 +00:00
Add missing newline to end of spotify status
output (#5480)
This commit is contained in:
parent
c713407f90
commit
3de0235ad2
1 changed files with 4 additions and 4 deletions
|
@ -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\nAlbum: %s\nTrack: %s \nPosition: %s / %s" "$artist" "$album" "$track" "$position" "$duration";
|
printf "$reset""Artist: %s\nAlbum: %s\nTrack: %s \nPosition: %s / %s\n" "$artist" "$album" "$track" "$position" "$duration";
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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 ;;
|
||||||
|
|
Loading…
Reference in a new issue