aboutsummaryrefslogtreecommitdiff
path: root/cmus-status
diff options
context:
space:
mode:
authorInqiyad Sabr <sabr@ariamath.xyz>2025-10-30 20:55:07 +0600
committerInqiyad Sabr <sabr@ariamath.xyz>2025-10-30 20:55:07 +0600
commit1a494a95e6436f90d3dfc1ca7647eafcc94e5034 (patch)
treea541396bc76bd0fe523d6f38a63f3ae9e9d951a5 /cmus-status
parent6a75fcff450e027cacf09b7765b89f18525b6f13 (diff)
Add cmus-status script which cmus module uses
To be honest all the hard work is done with the script than the cmus module itself lol, that's UNIX philosophy for ya
Diffstat (limited to 'cmus-status')
-rwxr-xr-xcmus-status19
1 files changed, 19 insertions, 0 deletions
diff --git a/cmus-status b/cmus-status
new file mode 100755
index 0000000..0afbc47
--- /dev/null
+++ b/cmus-status
@@ -0,0 +1,19 @@
+#!/bin/sh
+# :set status_display_program=cmus-status
+# copy this program to one of the $PATH
+file="/tmp/cmus-status"
+printf "" > $file # refresh
+[ $# = 2 ] &&\
+ printf "󰓛" > $file &&\
+ exit 0
+if [ "$2" = "playing" ];
+then s="󰐊";
+else s="";
+fi
+artist="${6}"
+album="${10}"
+num="${14}."
+title="${16}"
+format="$s $artist - $num $title"
+notify-send "🎵 Player" "$album\n$format" -t 3000
+printf "%s" "$format" >> $file