#!/bin/sh xrdb -override "$XDG_CONFIG_HOME/x/$1" # update bspwm colors "$XDG_CONFIG_HOME"/bspwm/bspwmrc # regenerate configs expand='s/(.*)@(\w+)/echo -n "\1"\\"$(xrdb -get \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" # toggle nheko theme theme="${1%dark}" sed -i "s/theme=.*/theme=${theme:-dawn}/" "$XDG_CONFIG_HOME/nheko.conf" # send color mode signal pkill -f -USR1 'qutebrowser-|urxvt' pkill dunst pkill nheko && nheko & pkill xclock && xclock & pgrep zathura | xargs -P4 -Ipid busctl --user call org.pwmt.zathura.PID-pid /org/pwmt/zathura org.pwmt.zathura SourceConfig & xsetroot -fg "$(xrdb -get root.foreground)" \ -bg "$(xrdb -get root.background)" \ -bitmap ~/img/tiles/arrows.xbm \