You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
904B

  1. #!/bin/zsh
  2. PANEL_FIFO=/tmp/panel-fifo
  3. if [ $(pgrep -cx panel) -gt 1 ] ; then
  4. printf "%s\n" "The panel is already running." >&2
  5. exit 1
  6. fi
  7. trap 'trap - TERM; kill 0' INT TERM QUIT EXIT
  8. [ -e "$PANEL_FIFO" ] && rm "$PANEL_FIFO"
  9. mkfifo "$PANEL_FIFO"
  10. bspc subscribe > "$PANEL_FIFO" &
  11. xtitle -sf 'T%s\n' > "$PANEL_FIFO" &
  12. if [ "$HOST" = "laptop" ];then
  13. battery -sf 'BI%i' > "$PANEL_FIFO" &
  14. fi
  15. clock -sf 'CD%a %d %b' > "$PANEL_FIFO" &
  16. clock -sf 'CT%H:%M' > "$PANEL_FIFO" &
  17. if [ "$HOST" = "hegp" ];then
  18. width=1660
  19. volume -sf 'VS%s' -d hw:1 > "$PANEL_FIFO" &
  20. volume -sf 'VI%i' -d hw:1 > "$PANEL_FIFO" &
  21. else
  22. width=1900
  23. volume -sf 'VS%s' > "$PANEL_FIFO" &
  24. volume -sf 'VI%i' > "$PANEL_FIFO" &
  25. fi
  26. cat "$PANEL_FIFO" \
  27. | panel_bar \
  28. | lemonbar -g "$width"x24+10+0 \
  29. -f "monofur\ for\ Powerline:size=10" \
  30. -f "FontAwesome:size=10" \
  31. -u 0 \
  32. -B '#00AAAAAA' \
  33. -F '#FF202020' &
  34. wait