mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-08-07 06:08:39 +02:00
change pause to play/pause
This commit is contained in:
parent
194612c16f
commit
0ce9da3c87
1 changed files with 8 additions and 2 deletions
|
|
@ -335,8 +335,14 @@ function spotify() {
|
||||||
break ;;
|
break ;;
|
||||||
|
|
||||||
"pause" )
|
"pause" )
|
||||||
cecho "Pausing Spotify.";
|
state=$(osascript -e 'tell application "Spotify" to player state as string');
|
||||||
osascript -e 'tell application "Spotify" to pause';
|
if [ "$state" = "playing" ]; then
|
||||||
|
cecho "Pausing Spotify.";
|
||||||
|
else
|
||||||
|
cecho "Playing Spotify.";
|
||||||
|
fi
|
||||||
|
|
||||||
|
osascript -e 'tell application "Spotify" to playpause';
|
||||||
break ;;
|
break ;;
|
||||||
|
|
||||||
"quit" )
|
"quit" )
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue