20 lines
486 B
Plaintext
20 lines
486 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
# xrdb
|
||
|
get_xrdb() {
|
||
|
xrdb -query | grep "$1" | awk '{print $2}' | tail -n1
|
||
|
}
|
||
|
|
||
|
outer="$(get_xrdb color0)" # outer
|
||
|
inner1="$(get_xrdb color4)" # focused
|
||
|
inner2="$(get_xrdb color8)" # normal
|
||
|
|
||
|
draw() { chwb2 -I "$i" -O "$o" -i "2" -o "8" $@ 2> /dev/null; }
|
||
|
|
||
|
# initial draw, and then subscribe to events
|
||
|
{ echo; bspc subscribe node_geometry node_focus; } |
|
||
|
while read -r _; do
|
||
|
i=$inner1 o=$outer draw "$(targets focused)"
|
||
|
i=$inner2 o=$outer draw "$(targets normal)"
|
||
|
done
|