Cleaned up now_playing script output and included a check for if cmus is playing
This commit is contained in:
parent
e5b9b32e4d
commit
368b81ae39
|
@ -1,4 +1,8 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
NOWPLAYING=$(basename "$(cmus-remote -Q | grep file | cut -f 2- -d ' ')")
|
||||
echo "{\"text\":\"\"$NOWPLAYING\"}"
|
||||
CHECK=$(cmus-remote -Q | grep status | cut -f 2- -d ' ')
|
||||
if [ "$CHECK" = "playing" ]; then
|
||||
NOWPLAYING=$(basename "$(cmus-remote -Q | grep file | cut -f 2- -d ' ')")
|
||||
printf " | "
|
||||
printf '%s' "$NOWPLAYING"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user