Skip to content

Instantly share code, notes, and snippets.

View themoonisacheese's full-sized avatar

themoonisacheese

View GitHub Profile
#!/bin/bash
#themoonisacheese@poggers.website
#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"