dgy
/
hexagons
Archived
1
0
Fork 0
This repository has been archived on 2021-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
hexagons/.local/bin/borders

20 lines
486 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 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