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 | |
set -e | |
# Toggle is possible only while track is playing | |
if playerctl --player=spotify status | grep -v Playing; then | |
exit 1 | |
fi | |
# Kill other instances of this script (to avoid windows swithing races) |