Browse Source

Ignore empty sections in dwm_status.sh

Frans Bergman 4 years ago
parent
commit
0d9990107b
1 changed files with 4 additions and 2 deletions
  1. 4 2
      .scripts/dwm_status.sh

+ 4 - 2
.scripts/dwm_status.sh

@@ -5,10 +5,12 @@ trap 'echo "Caught SIGUSR1"' USR1
 while true; do
     STATUS=""
     for section in "$HOME"/.scripts/status/*.sh; do
+        out="$($section)"
+        [ -z "$out" ] && continue
         if [ -z "$STATUS" ]; then
-            STATUS="$($section)"
+            STATUS="$out"
         else
-            STATUS="$STATUS | $($section)"
+            STATUS="$STATUS | $out"
         fi
     done
     xsetroot -name " $STATUS"