This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |