My personal dotfiles
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.

panel 998B

12345678910111213141516171819202122232425262728293031323334
  1. #! /bin/sh
  2. if xdo id -a "$PANEL_WM_NAME" > /dev/null ; then
  3. printf "%s\n" "The panel is already running." >&2
  4. exit 1
  5. fi
  6. trap 'trap - TERM; kill 0' INT TERM QUIT EXIT
  7. [ -e "$PANEL_FIFO" ] && rm "$PANEL_FIFO"
  8. mkfifo "$PANEL_FIFO"
  9. bspc config top_padding $PANEL_HEIGHT
  10. bspc subscribe report > "$PANEL_FIFO" &
  11. xtitle -sf 'T%s' > "$PANEL_FIFO" &
  12. clock -sf 'S%a %I:%M' > "$PANEL_FIFO" &
  13. ~/.config/bspwm/panel/battery > "$PANEL_FIFO" &
  14. ~/.config/bspwm/panel/audio > "$PANEL_FIFO" &
  15. ~/.config/bspwm/panel/brightness > "$PANEL_FIFO" &
  16. . panel_colors
  17. panel_bar < "$PANEL_FIFO" | lemonbar -a 32 -n "$PANEL_WM_NAME" -g x$PANEL_HEIGHT -f "$PANEL_FONT" -f "Font Awesome:size=11" -F "$COLOR_DEFAULT_FG" -B "$COLOR_DEFAULT_BG" | sh &
  18. wid=$(xdo id -a "$PANEL_WM_NAME")
  19. tries_left=20
  20. while [ -z "$wid" -a "$tries_left" -gt 0 ] ; do
  21. sleep 0.05
  22. wid=$(xdo id -a "$PANEL_WM_NAME")
  23. tries_left=$((tries_left - 1))
  24. done
  25. [ -n "$wid" ] && xdo above -t "$(xdo id -N Bspwm -n root | sort | head -n 1)" "$wid"
  26. wait