misc/scripts/color-mode

22 lines
544 B
Bash
Executable File

#!/bin/sh
xcolor() { xrdb -query | grep -Po "color$1:\s+\K#\w+"; }
xrdb -override "$XDG_CONFIG_HOME/x/$1"
pkill -USR1 'qutebrowser|urxvt'
"$XDG_CONFIG_HOME/bspwm/bspwmrc"
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)"
fi
if test "$1" = dark; then
xsetroot -fg \#4F5B66 -bg \#343D46 -bitmap ~/img/tiles/tile.xbm
fi