diff options
| author | Inqiyad Sabr <sabr@ariamath.xyz> | 2025-11-18 14:42:04 +0600 |
|---|---|---|
| committer | Inqiyad Sabr <sabr@ariamath.xyz> | 2025-11-18 14:42:04 +0600 |
| commit | ccad4019ce8e83cc7e9f3edb257c78bb51589421 (patch) | |
| tree | 344a0a47e0c0b330105b5d25d7ee9ac8284610f2 /cmus-status | |
| parent | 1a494a95e6436f90d3dfc1ca7647eafcc94e5034 (diff) | |
Fixing all redundancies in code reading, hopefully.
Diffstat (limited to 'cmus-status')
| -rwxr-xr-x | cmus-status | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/cmus-status b/cmus-status index 0afbc47..9d7c4a4 100755 --- a/cmus-status +++ b/cmus-status @@ -1,19 +1,25 @@ #!/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 &&\ + printf '' > $file &&\ exit 0 + if [ "$2" = "playing" ]; -then s=""; -else s=""; +then icon=""; +else icon=""; fi + artist="${6}" album="${10}" -num="${14}." +num="${14}" title="${16}" -format="$s $artist - $num $title" +format="${icon} ${artist} - ${album} - ${num}. ${title}" + notify-send "🎵 Player" "$album\n$format" -t 3000 +printf "%s %10s - %10s - %s. %40s"\ + "${icon}" "${artist}" "${album}"\ + "${num}" "${title}" printf "%s" "$format" >> $file |