Skip to content

Instantly share code, notes, and snippets.

@RustingSword
Created October 23, 2011 02:48
Show Gist options
  • Save RustingSword/1306790 to your computer and use it in GitHub Desktop.
Save RustingSword/1306790 to your computer and use it in GitHub Desktop.
#!/bin/bash
song=$(echo -n `mocp -Q %song 2> /dev/null`)
artist=$(echo -n `mocp -Q %artist 2> /dev/null`)
if [[ "$song" != "" ]]
then
if [[ "$artist" != "" ]]
then
echo -n "\${color white} Now Playing: \${color green} $song - $artist"
else
echo -n "\${color white} Now Playing: \${color green} $song"
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment