summaryrefslogtreecommitdiff
path: root/.local/bin/statusbar/bar-cmus
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/statusbar/bar-cmus')
-rwxr-xr-x.local/bin/statusbar/bar-cmus25
1 files changed, 0 insertions, 25 deletions
diff --git a/.local/bin/statusbar/bar-cmus b/.local/bin/statusbar/bar-cmus
deleted file mode 100755
index 947f950..0000000
--- a/.local/bin/statusbar/bar-cmus
+++ /dev/null
@@ -1,25 +0,0 @@
1#!/bin/sh
2
3case $BUTTON in
4 1)notify-send "$(cmus-remote -Q | grep position | awk '{ printf "%02i:%02i", $2/60, $2%60}')/$(cmus-remote -Q | grep duration | awk '{ printf "%02i:%02i\n", $2/60, $2%60} ') ($(cmus-remote -Q | grep status | cut -d ' ' -f 2-))
5Artist: $(cmus-remote -Q | grep "tag artist " | cut -d ' ' -f 3-)
6Album: $(cmus-remote -Q | grep "tag album " | cut -d ' ' -f 3-)
7Track: $(cmus-remote -Q | grep "tag title " | cut -d ' ' -f 3-)
8Genre: $(cmus-remote -Q | grep "tag genre " | cut -d ' ' -f 3-)
9Mode: $(cmus-remote -Q | grep "aaa_mode" | cut -d ' ' -f 3)
10Format: $(cmus-remote -Q | grep file | rev | cut -d '.' -f 1 | rev)
11Shuffle: $(cmus-remote -Q | grep "set shuffle " | cut -d ' ' -f 3-)
12Repeat: $(cmus-remote -Q | grep "set repeat_current " | cut -d ' ' -f 3-)";;
13
14 3)urxvt -e vim ~/.local/bin/statusbar/cmus;;
15 4)cmus-remote --next;;
16 5)cmus-remote --prev;;
17esac
18
19pgrep -x cmus >/dev/null || exit 0
20
21status="$(cmus-remote -Q | grep status | cut -d ' ' -f 2)"
22artist="$(cmus-remote -Q | grep "tag artist" | cut -d ' ' -f 3- | tr -d "\n")"
23track="$(cmus-remote -Q | grep "tag title" | cut -d ' ' -f 3- | tr -d "\n")"
24echo -n "$artist - $track"
25[ "$status" = "playing" ] || echo -n " [P]"