Commit 96d57dc3 authored by mahi97's avatar mahi97
Browse files

change pause to play/pause

parent 2a5321f4
......@@ -335,8 +335,14 @@ function spotify() {
break ;;
"pause" )
state=$(osascript -e 'tell application "Spotify" to player state as string');
if [ "$state" = "playing" ]; then
cecho "Pausing Spotify.";
osascript -e 'tell application "Spotify" to pause';
else
cecho "Playing Spotify.";
fi
osascript -e 'tell application "Spotify" to playpause';
break ;;
"quit" )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment