Skip to content

Instantly share code, notes, and snippets.

@kstep
Created January 24, 2014 15:39
Show Gist options
  • Save kstep/8599679 to your computer and use it in GitHub Desktop.
Save kstep/8599679 to your computer and use it in GitHub Desktop.
Simple player with "mplayer" and current song notifications.
mplayer -vo null -playlist playlist.m3u -loop 0 -shuffle | awk -F ': ' '/^ title: / { title=$2; gsub(/'\''/, "&\\\\&&", title) } /^ artist: / { artist=$2; gsub(/'\''/, "&\\\\&&", artist) } /^Starting playback/ { system("notify-send -i /usr/share/icons/oxygen/22x22/actions/media-playback-start.png Playing '\''" artist " — " title "'\''") }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment