update color-mode for xrdb -query patch
This commit is contained in:
parent
05f3c5aa0f
commit
e97ccd2cd2
@ -1,21 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
xcolor() { xrdb -query | grep -Po "color$1:\s+\K#\w+"; }
|
||||
|
||||
xrdb -override "$XDG_CONFIG_HOME/x/$1"
|
||||
|
||||
# send color mode signal
|
||||
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
|
||||
# update bspwm colors
|
||||
"$XDG_CONFIG_HOME"/bspwm/bspwmrc
|
||||
|
||||
if test "$1" = dark; then
|
||||
xsetroot -fg \#4F5B66 -bg \#343D46 -bitmap ~/img/tiles/tile.xbm
|
||||
fi
|
||||
# regenerate configs
|
||||
expand='s/(.*)@(\w+)/echo -n "\1"\\"$(xrdb -query \2)\\"/; /\$/e'
|
||||
sed -r "$expand" "$XDG_CONFIG_HOME/zathura/zathurarc.in" > "$XDG_CONFIG_HOME/zathura/zathurarc"
|
||||
sed -r "$expand" "$XDG_CONFIG_HOME/dunst/dunstrc.in" > "$XDG_CONFIG_HOME/dunst/dunstrc"
|
||||
|
||||
xsetroot -fg "$(xrdb -query root.foreground)" \
|
||||
-bg "$(xrdb -query root.background)" \
|
||||
-bitmap ~/img/tiles/tile.xbm \
|
||||
|
Loading…
Reference in New Issue
Block a user