misc/scripts/color-mode

22 lines
544 B
Plaintext
Raw Normal View History

2020-07-06 11:57:43 +02:00
#!/bin/sh
xcolor() { xrdb -query | grep -Po "color$1:\s+\K#\w+"; }
2020-07-25 17:38:45 +02:00
xrdb -override "$XDG_CONFIG_HOME/x/$1"
2020-07-06 11:57:43 +02:00
pkill -USR1 'qutebrowser|urxvt'
2020-07-25 17:38:45 +02:00
"$XDG_CONFIG_HOME/bspwm/bspwmrc"
2020-07-08 11:53:43 +02:00
2020-07-25 17:38:45 +02:00
if test "$1" = light; then
xsetroot -fg "$(xcolor 14)" -bg "$(xcolor 11)" \
-bitmap ~/img/tiles/tile.xbm
bspc config focused_border_color "$(xcolor 3)"
bspc config normal_border_color "$(xcolor 8)"
bspc config presel_feedback_color "$(xcolor 3)"
2020-07-08 11:53:43 +02:00
fi
2020-07-25 17:38:45 +02:00
if test "$1" = dark; then
2020-07-08 11:53:43 +02:00
xsetroot -fg \#4F5B66 -bg \#343D46 -bitmap ~/img/tiles/tile.xbm
fi