blob: 6cb9f1074febebf0d59c4f159634dae5ae11bc62 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/bin/bash
status=$(cmus-remote -Q | grep status | awk '{print $2}')
if [ $status = "playing" ]; then
artist=$(cmus-remote -Q | grep "tag artist " | cut -d' ' -f3-)
title=$(cmus-remote -Q | grep "tag title " | cut -d' ' -f3-)
[ -z $artist ] && artist="(unknown)"
[ -z $title ] && title=$(cmus-remote -Q | grep "file " | cut -d'/' -f5-)
echo "$artist ─ $title"
else
echo "$status"
fi
|