Browse Source

Add support for mpd to dwm status script

Frans Bergman 5 years ago
parent
commit
b33374d676
1 changed files with 5 additions and 1 deletions
  1. 5 1
      .scripts/dwm_status.sh

+ 5 - 1
.scripts/dwm_status.sh

@@ -1,7 +1,11 @@
 #!/bin/sh
 
 while true; do
-    MUSIC="$(playerctl metadata artist) - $(playerctl metadata title)"
+    if playerctl metadata; then
+        MUSIC="$(playerctl metadata artist) - $(playerctl metadata title)"
+    else
+        MUSIC="$(mpc current)"
+    fi
     MEM="$(free -h | awk '(NR==2){ print $3 }')"
     VOL="$(pulseaudio-ctl full-status | awk '{print $1 "%" ($2 == "yes" ? " (muted)" : "")}')"
     TEMP="$(sensors | awk '/Package/{print $4}')"