helm/base/arch-desktop/bin/inject-xcolors
2017-12-13 18:28:21 -05:00

13 lines
235 B
Bash
Executable file

#!/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