change pause to play/pause
This commit is contained in:
parent
2a5321f4e6
commit
96d57dc33e
@ -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" )
|
||||||
|
Loading…
Reference in New Issue
Block a user