Skip to content

Instantly share code, notes, and snippets.

View themoonisacheese's full-sized avatar

themoonisacheese

View GitHub Profile
#!/bin/bash
#[email protected]
#nowplaying: display currently playing song based on playerctl info (dbus)
#dependencies: playerctl: https://github.com/altdesktop/playerctl
#use with watch (man watch) for live-ish updates ex: watch -tc nowplaying
#spawn a window specifically for a widget-style thing ex: uxterm -bg "#333" -fg "#fff" -geometry 100x1 -e watch -wtc nowplaying
STATUS=`playerctl status 2>&1`
if [[ $STATUS == 'No players found' ]]; then
echo "No music"