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.

54 lines
1.1KB

  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. height=24
  20. size=10
  21. volume -sf 'VS%s' -d hw:1 > "$PANEL_FIFO" &
  22. volume -sf 'VI%i' -d hw:1 > "$PANEL_FIFO" &
  23. elif [ "$HOST" = "home" ];then
  24. width=1900
  25. height=44
  26. size=20
  27. volume -sf 'VS%s' > "$PANEL_FIFO" &
  28. volume -sf 'VI%i' > "$PANEL_FIFO" &
  29. else
  30. height=24
  31. width=1900
  32. size=10
  33. volume -sf 'VS%s' > "$PANEL_FIFO" &
  34. volume -sf 'VI%i' > "$PANEL_FIFO" &
  35. fi
  36. cat "$PANEL_FIFO" \
  37. | panel_bar \
  38. | lemonbar -g "$width"x"$height"+10+0 \
  39. -f "monofur\ for\ Powerline:size=$size" \
  40. -f "FontAwesome:size=$size" \
  41. -u 0 \
  42. -B '#00AAAAAA' \
  43. -F '#FF202020' &
  44. wait