20 lines
487 B
Bash
Executable File
20 lines
487 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# xrdb
|
|
get_xrdb() {
|
|
xrdb -query | grep "$1" | awk '{print $2}' | tail -n1
|
|
}
|
|
|
|
outer="$(get_xrdb color0)" # outer
|
|
inner1="$(get_xrdb color12)" # 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
|