Created
October 3, 2011 16:32
-
-
Save omerk/1259533 to your computer and use it in GitHub Desktop.
Spotify 'Now Playing'
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
#!/bin/bash | |
pgrep spotify 1>/dev/null 2>&1 | |
if [ $? != 0 ]; then | |
exit 1 | |
fi | |
xwininfo -root -tree | grep "Spotify -" | sed 's/[ ]*0x[0-9a-f]* "Spotify - \(.*\)": ("spotify" "Spotify").*/\1/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment