dwm_status.sh 378 B

12345678910111213141516171819
  1. #!/bin/sh
  2. trap 'echo "Caught SIGUSR1"' USR1
  3. while true; do
  4. STATUS=""
  5. for section in "$HOME"/.scripts/status/*.sh; do
  6. out="$($section)"
  7. [ -z "$out" ] && continue
  8. if [ -z "$STATUS" ]; then
  9. STATUS="$out"
  10. else
  11. STATUS="$STATUS | $out"
  12. fi
  13. done
  14. xsetroot -name " $STATUS "
  15. sleep 5 &
  16. wait $!
  17. done