Browse Source

Add support for mpd to dwm status script

Frans Bergman 5 năm trước cách đây
mục cha
commit
b33374d676
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  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}')"