Explorar o código

Ignore empty sections in dwm_status.sh

Frans Bergman %!s(int64=4) %!d(string=hai) anos
pai
achega
0d9990107b
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  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"