|
@ -1,37 +1,26 @@ |
|
|
#! /bin/sh |
|
|
#! /bin/sh |
|
|
|
|
|
|
|
|
if [ $(pgrep -cx panel) -gt 1 ] ; then |
|
|
|
|
|
|
|
|
. ~/.config/bspwm/panel/panel.conf |
|
|
|
|
|
|
|
|
|
|
|
if xdo id -a "$PANEL_WM_NAME" > /dev/null; then |
|
|
printf "%s\n" "The panel is already running." >&2 |
|
|
printf "%s\n" "The panel is already running." >&2 |
|
|
exit 1 |
|
|
exit 1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
trap 'trap - TERM; kill 0' INT TERM QUIT EXIT |
|
|
trap 'trap - TERM; kill 0' INT TERM QUIT EXIT |
|
|
|
|
|
|
|
|
flavor=${1:-bar} |
|
|
|
|
|
|
|
|
|
|
|
[ -e "$PANEL_FIFO" ] && rm "$PANEL_FIFO" |
|
|
[ -e "$PANEL_FIFO" ] && rm "$PANEL_FIFO" |
|
|
mkfifo "$PANEL_FIFO" |
|
|
mkfifo "$PANEL_FIFO" |
|
|
|
|
|
|
|
|
bspc config top_padding $PANEL_HEIGHT |
|
|
bspc config top_padding $PANEL_HEIGHT |
|
|
|
|
|
|
|
|
#bspc control --subscribe > "$PANEL_FIFO" & |
|
|
|
|
|
bspc subscribe report > "$PANEL_FIFO" & |
|
|
|
|
|
xtitle -sf 'T%s\n' | sed -u 's/^\(.................................................\).*\(..........................\)/\1...\2/' > "$PANEL_FIFO" & |
|
|
xtitle -sf 'T%s\n' | sed -u 's/^\(.................................................\).*\(..........................\)/\1...\2/' > "$PANEL_FIFO" & |
|
|
|
|
|
bspc subscribe report > "$PANEL_FIFO" & |
|
|
tick > "$PANEL_FIFO" & |
|
|
tick > "$PANEL_FIFO" & |
|
|
#clock -s -i 1 -f 'S%a %F %r' > "$PANEL_FIFO" & |
|
|
|
|
|
#clock -sf 'S%a %H:%M' > "$PANEL_FIFO" & |
|
|
|
|
|
|
|
|
|
|
|
echo "$PANEL_FONT" |
|
|
|
|
|
case "$flavor" in |
|
|
|
|
|
bar) |
|
|
|
|
|
cat "$PANEL_FIFO" | /home/djsissom/.config/bspwm/panel/panel_bar | lemonbar -g "x$PANEL_HEIGHT" -B "#BF000000" -F "#FF9A875F" -f "$PANEL_FONT" -f "$PANEL_FONT2" -f "$PANEL_FONT3" & |
|
|
|
|
|
;; |
|
|
|
|
|
dzen2) |
|
|
|
|
|
. panel_colors |
|
|
|
|
|
FONT_FAMILY='DejaVu Sans' |
|
|
|
|
|
FONT_SIZE=11 |
|
|
|
|
|
cat "$PANEL_FIFO" | panel_dzen2 -f "$FONT_FAMILY" -s "$FONT_SIZE" | dzen2 -h $PANEL_HEIGHT -dock -ta l -title-name panel -fn "${FONT_FAMILY}:pixelsize=${FONT_SIZE}" -fg "$COLOR_FOREGROUND" -bg "$COLOR_BACKGROUND" & |
|
|
|
|
|
;; |
|
|
|
|
|
esac |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
~/.config/bspwm/panel/panel_bar < "$PANEL_FIFO" | lemonbar -n "$PANEL_WM_NAME" -g "x$PANEL_HEIGHT" -B "#BF000000" -F "#FF9A875F" -f "$PANEL_FONT" -f "$PANEL_FONT2" -f "$PANEL_FONT3" | sh & |
|
|
|
|
|
|
|
|
|
|
|
wid=$(xdo id -m -a "$PANEL_WM_NAME") |
|
|
|
|
|
xdo above -t $(xdo id -N Bspwm -n root | sort | head -n 1) $wid |
|
|
|
|
|
|
|
|
wait |
|
|
wait |