add bspwm config and use as default WM
This commit is contained in:
64
.config/bspwm/panel
Executable file
64
.config/bspwm/panel
Executable file
@ -0,0 +1,64 @@
|
||||
#!/bin/sh
|
||||
|
||||
BAR_BG='#1a343a'
|
||||
BAR_FG='#e2f6e1'
|
||||
ACTIVE_BG='#3585ce'
|
||||
URGENT_BG='#ff0000'
|
||||
FREE_FG='#808080'
|
||||
|
||||
PANEL_FIFO=~/.panel-fifo
|
||||
|
||||
[ -e "$PANEL_FIFO" ] && rm -f "$PANEL_FIFO"
|
||||
mkfifo "$PANEL_FIFO"
|
||||
|
||||
bspc subscribe > "$PANEL_FIFO" &
|
||||
|
||||
xtitle -sf 'T%s\n' > "$PANEL_FIFO" &
|
||||
|
||||
while true; do
|
||||
echo "C$(date '+%H:%M')"
|
||||
sleep 1
|
||||
done > "$PANEL_FIFO" &
|
||||
|
||||
while read -r line ; do
|
||||
case "$line" in
|
||||
C*)
|
||||
clock="${line#?}"
|
||||
;;
|
||||
T*)
|
||||
title="${line#?}"
|
||||
;;
|
||||
W*)
|
||||
wm=
|
||||
IFS=':' set -- ${line#?}
|
||||
while [ $# -gt 0 ]; do
|
||||
item="$1"
|
||||
name="${item#?}"
|
||||
case "$item" in
|
||||
[fFOoUu]*)
|
||||
case "$item" in
|
||||
[OF]*)
|
||||
BG="${ACTIVE_BG}"
|
||||
FG="-"
|
||||
;;
|
||||
o*)
|
||||
BG="-"
|
||||
FG="-"
|
||||
;;
|
||||
f*)
|
||||
BG="-"
|
||||
FG="${FREE_FG}"
|
||||
;;
|
||||
[uU]*)
|
||||
BG="${URGENT_BG}"
|
||||
FG="-"
|
||||
;;
|
||||
esac
|
||||
wm="${wm}%{B${BG}}%{F${FG}}%{A:bspc desktop -f ${name}:} ${name} %{A}%{B-}%{F-}"
|
||||
esac
|
||||
shift
|
||||
done
|
||||
;;
|
||||
esac
|
||||
printf "%s\n" " ${wm} ${title}%{r}${clock} "
|
||||
done < "$PANEL_FIFO" | lemonbar -B "${BAR_BG}" -F "${BAR_FG}" -n panel -f Iosevka:pixelsize=30:antialias=true:autohint=true | sh
|
Reference in New Issue
Block a user