Last active
November 1, 2019 01:45
-
-
Save brendonjohn/add0de3db9d3bfbc80d2df320ac26505 to your computer and use it in GitHub Desktop.
A script that actually plays the previous Spotify track.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
osascript -e 'tell application "Spotify" to set player position to 0' | |
osascript -e 'tell application "Spotify" to previous track' | |
echo -n -e "\033]0;previousTrack\007" | |
osascript -e 'tell application "Terminal" to close (every window whose name contains "previousTrack")' & | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment