Skip to content

Instantly share code, notes, and snippets.

@tremby
Created January 6, 2012 18:06
Show Gist options
  • Save tremby/1571689 to your computer and use it in GitHub Desktop.
Save tremby/1571689 to your computer and use it in GitHub Desktop.
np -- print MPD now playing string
#!/bin/bash
np=$(mpc --format "%artist% -- \"%title%\" (##%track% on %album%)" | head -1)
if [[ $np == "volume:"* ]]; then
exit 1
fi
echo "np: $np"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment