#!/usr/bin/env bash #STATUS=$(cmus-remote -Q | grep status | cut --delimiter=' ' --fields=2) STATUS=$(playerctl status) #TITLE=$(cmus-remote -Q | grep title | cut --delimiter=' ' --fields=3-) TITLE=$(playerctl metadata title) #ARTIST=$(cmus-remote -Q | grep ' artist ' | cut --delimiter=' ' --fields=3-) ARTIST=$(playerctl metadata artist) if [ $STATUS = "Playing" ] ; then ICON=" " elif [ $STATUS = "Paused" ] ; then ICON=" " else ICON="" fi if [ -n "$ARTIST" ] || [ -n "$TITLE" ] ; then echo "$ICON $ARTIST - $TITLE" fi