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.

64 lines
1.3KB

  1. #!/bin/zsh
  2. PANEL_FIFO=/tmp/panel-fifo
  3. # If already started, kill utilities
  4. if [ -e "$PANEL_FIFO" ]; then
  5. rm "$PANEL_FIFO"
  6. killall panel_bar
  7. killall bspc
  8. killall xtitle
  9. killall clock
  10. killall battery
  11. killall volume
  12. fi
  13. mkfifo "$PANEL_FIFO"
  14. bspc subscribe > "$PANEL_FIFO" &
  15. xtitle -sf 'T%s\n' > "$PANEL_FIFO" &
  16. clock -sf 'CD%a %d %b' > "$PANEL_FIFO" &
  17. clock -sf 'CT%H:%M' > "$PANEL_FIFO" &
  18. case $HOST in
  19. hegp)
  20. width=3820
  21. height=30
  22. size=12
  23. volume -sf 'VS%s' -d hw:1 > "$PANEL_FIFO" &
  24. volume -sf 'VI%i' -d hw:1 > "$PANEL_FIFO" &
  25. ;;
  26. home)
  27. width=1900
  28. height=44
  29. size=20
  30. volume -sf 'VS%s' > "$PANEL_FIFO" &
  31. volume -sf 'VI%i' > "$PANEL_FIFO" &
  32. ;;
  33. hegp-laptop|tablet|hnv-laptop)
  34. width=1900
  35. height=24
  36. size=10
  37. volume -sf 'VS%s' > "$PANEL_FIFO" &
  38. volume -sf 'VI%i' > "$PANEL_FIFO" &
  39. battery -sf 'BS%s' > "$PANEL_FIFO" &
  40. battery -sf 'BI%i' > "$PANEL_FIFO" &
  41. ;;
  42. esac
  43. # If given a width, use it
  44. if [[ -n "$1" ]]; then
  45. width="$1"
  46. fi
  47. cat "$PANEL_FIFO" \
  48. | panel_bar \
  49. | lemonbar -g "$width"x"$height"+10+0 \
  50. -f "monofur\ for\ Powerline:size=$size" \
  51. -f "FontAwesome:size=$size" \
  52. -u 0 \
  53. -B '#00AAAAAA' \
  54. -F '#FF202020' &
  55. wait