Recolor zathura in switch-theme
This commit is contained in:
parent
5232b8a3e9
commit
c4156d2080
|
@ -9,7 +9,7 @@ fi
|
||||||
mode=$1
|
mode=$1
|
||||||
|
|
||||||
capitalize() {
|
capitalize() {
|
||||||
printf '%s' "$1" | head -c 1 | tr [:lower:] [:upper:]
|
printf '%s' "$1" | head -c 1 | tr "[:lower:]" "[:upper:]"
|
||||||
printf '%s' "$1" | tail -c '+2'
|
printf '%s' "$1" | tail -c '+2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,14 +17,27 @@ change_theme() {
|
||||||
sed -i "s/iceberg_$1/iceberg_$2/" ~/.config/kitty/kitty.conf
|
sed -i "s/iceberg_$1/iceberg_$2/" ~/.config/kitty/kitty.conf
|
||||||
sed -i "s/bg=$1/bg=$2/" ~/.config/nvim/init.vim
|
sed -i "s/bg=$1/bg=$2/" ~/.config/nvim/init.vim
|
||||||
sed -i "s/iceberg_$1/iceberg_$2/" ~/.dotfiles/tmux/.tmux.conf
|
sed -i "s/iceberg_$1/iceberg_$2/" ~/.dotfiles/tmux/.tmux.conf
|
||||||
|
sed -i "s/iceberg_$1/iceberg_$2/" ~/.config/zathura/zathurarc
|
||||||
kitty +kitten themes --reload-in=all "Iceberg $(capitalize "$2")"
|
kitty +kitten themes --reload-in=all "Iceberg $(capitalize "$2")"
|
||||||
tmux source-file ~/.tmux.conf
|
tmux source-file ~/.tmux.conf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
recolor_zathura() {
|
||||||
|
instances=$(pgrep -f zathura)
|
||||||
|
temp_file=/tmp/zathura-instances
|
||||||
|
echo "$instances" >"$temp_file"
|
||||||
|
while IFS= read -r line; do
|
||||||
|
dbus-send --type="method_call" --dest=org.pwmt.zathura.PID-"$line" \
|
||||||
|
/org/pwmt/zathura org.pwmt.zathura.ExecuteCommand string:"source"
|
||||||
|
done <"$temp_file"
|
||||||
|
}
|
||||||
|
|
||||||
if [ "$mode" = "light" ]; then
|
if [ "$mode" = "light" ]; then
|
||||||
emacsclient --eval "(load-theme 'doom-nord-light 'no-confirm)"
|
emacsclient --eval "(load-theme 'doom-nord-light 'no-confirm)"
|
||||||
change_theme dark light
|
change_theme dark light
|
||||||
|
recolor_zathura
|
||||||
else
|
else
|
||||||
emacsclient --eval "(load-theme 'doom-nord 'no-confirm)"
|
emacsclient --eval "(load-theme 'doom-nord 'no-confirm)"
|
||||||
change_theme light dark
|
change_theme light dark
|
||||||
|
recolor_zathura
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
set recolor-lightcolor "#161821"
|
||||||
|
set recolor-darkcolor "#c6c8d1"
|
||||||
|
set completion-bg "#161821"
|
||||||
|
set statusbar-bg "#161821"
|
||||||
|
set statusbar-fg "#c6c8d1"
|
|
@ -0,0 +1,5 @@
|
||||||
|
set recolor-lightcolor "#e8e9ec"
|
||||||
|
set recolor-darkcolor "#33374c"
|
||||||
|
set completion-bg "#e8e9ec"
|
||||||
|
set statusbar-bg "#e8e9ec"
|
||||||
|
set statusbar-fg "#33374c"
|
|
@ -1,15 +1,11 @@
|
||||||
# Zathura configuration
|
# Zathura configuration
|
||||||
set adjust-open "width"
|
set adjust-open "width"
|
||||||
set selection-clipboard clipboard
|
set selection-clipboard clipboard
|
||||||
set recolor-lightcolor "#161821"
|
|
||||||
set recolor-darkcolor "#c6c8d1"
|
|
||||||
set recolor true
|
set recolor true
|
||||||
set recolor-keephue true
|
set recolor-keephue true
|
||||||
set smooth-scroll true
|
set smooth-scroll true
|
||||||
set window-title-basename true
|
set window-title-basename true
|
||||||
set completion-bg "#161821"
|
set completion-bg "#161821"
|
||||||
set statusbar-bg "#161821"
|
|
||||||
set statusbar-fg "#c6c8d1"
|
|
||||||
set highlight-color "#a093c7"
|
set highlight-color "#a093c7"
|
||||||
set highlight-active-color "#a093c7"
|
set highlight-active-color "#a093c7"
|
||||||
set font "Terminus \(TTF\) 15"
|
set font "Terminus \(TTF\) 15"
|
||||||
|
|
Loading…
Reference in New Issue