helm/base/arch-desktop/bin/inject-xcolors

13 lines
235 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
xcolor() {
xrdb -query | awk "/^\*\.$1:/ {print \$2}" | sed -E 's/^[^#]+//'
}
COLOR_FG=$(xcolor foreground)
COLOR_BG=$(xcolor background)
for ((i=0;i<=15;i++)); do
eval "COLOR_$i=\$(xcolor color$i)"
done