| 1 | #! /bin/sh |
| 2 | |
| 3 | if [ $(pgrep -cx panel) -gt 1 ] ; then |
| 4 | printf "%s\n" "The panel is already running." >&2 |
| 5 | exit 1 |
| 6 | fi |
| 7 | |
| 8 | trap 'trap - TERM; kill 0' INT TERM QUIT EXIT |
| 9 | |
| 10 | [ -e "$PANEL_FIFO" ] && rm "$PANEL_FIFO" |
| 11 | mkfifo "$PANEL_FIFO" |
| 12 | |
| 13 | bspc config top_padding $PANEL_HEIGHT |
| 14 | bspc control --subscribe > "$PANEL_FIFO" & |
| 15 | #xtitle -sf 'T%s' > "$PANEL_FIFO" & |
| 16 | #clock -sf 'S%a %H:%M' > "$PANEL_FIFO" & |
| 17 | |
| 18 | pamixer --get-volume > /tmp/volinfo |
| 19 | if $(pamixer --get-mute) ; then |
| 20 | echo ⮝ > /tmp/spkicon |
| 21 | else |
| 22 | echo ⮟ > /tmp/spkicon |
| 23 | fi |
| 24 | conky > "$PANEL_FIFO" & |
| 25 | |
| 26 | . panel_colors |
| 27 | |
| 28 | cat "$PANEL_FIFO" | panel_bar | bar -g x$PANEL_HEIGHT -f "$PANEL_FONT_FAMILY1","$PANEL_FONT_FAMILY2" -F "$COLOR_FOREGROUND" -B "$COLOR_BACKGROUND" & |
| 29 | |
| 30 | wait |