Change music.sh to use cmus
Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
This commit is contained in:
parent
778debc10f
commit
e3381dd4d0
1 changed files with 9 additions and 2 deletions
|
@ -1,8 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# music.sh
|
||||||
|
|
||||||
OUTPUT="$(audtool current-song)"
|
QUERY="$(cmus-remote -Q)"
|
||||||
|
|
||||||
if [ -z "$OUTPUT" ]; then
|
STATUS="$(echo "$QUERY" | grep -e "status " | cut -d " " -f 2)"
|
||||||
|
ARTIST="$(echo "$QUERY" | grep -e " artist " | cut -d " " -f 3-)"
|
||||||
|
TITLE="$(echo "$QUERY" | grep -e " title " | cut -d " " -f 3-)"
|
||||||
|
|
||||||
|
OUTPUT="$ARTIST - $TITLE"
|
||||||
|
|
||||||
|
if [ "$STATUS" != "playing" ]; then
|
||||||
OUTPUT="Not playing"
|
OUTPUT="Not playing"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue