diff --git a/scripts/.local/share/scripts/switch-theme b/scripts/.local/share/scripts/switch-theme index 7c86f0c..730a805 100755 --- a/scripts/.local/share/scripts/switch-theme +++ b/scripts/.local/share/scripts/switch-theme @@ -9,7 +9,7 @@ fi mode=$1 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' } @@ -17,14 +17,27 @@ change_theme() { 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/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")" 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 emacsclient --eval "(load-theme 'doom-nord-light 'no-confirm)" change_theme dark light + recolor_zathura else emacsclient --eval "(load-theme 'doom-nord 'no-confirm)" change_theme light dark + recolor_zathura fi diff --git a/zathura/.config/zathura/iceberg_dark.conf b/zathura/.config/zathura/iceberg_dark.conf new file mode 100644 index 0000000..a318d99 --- /dev/null +++ b/zathura/.config/zathura/iceberg_dark.conf @@ -0,0 +1,5 @@ +set recolor-lightcolor "#161821" +set recolor-darkcolor "#c6c8d1" +set completion-bg "#161821" +set statusbar-bg "#161821" +set statusbar-fg "#c6c8d1" diff --git a/zathura/.config/zathura/iceberg_light.conf b/zathura/.config/zathura/iceberg_light.conf new file mode 100644 index 0000000..2fbdd1e --- /dev/null +++ b/zathura/.config/zathura/iceberg_light.conf @@ -0,0 +1,5 @@ +set recolor-lightcolor "#e8e9ec" +set recolor-darkcolor "#33374c" +set completion-bg "#e8e9ec" +set statusbar-bg "#e8e9ec" +set statusbar-fg "#33374c" diff --git a/zathura/.config/zathura/zathurarc b/zathura/.config/zathura/zathurarc index eb9cac4..a9d340e 100644 --- a/zathura/.config/zathura/zathurarc +++ b/zathura/.config/zathura/zathurarc @@ -1,15 +1,11 @@ # Zathura configuration set adjust-open "width" set selection-clipboard clipboard -set recolor-lightcolor "#161821" -set recolor-darkcolor "#c6c8d1" set recolor true set recolor-keephue true set smooth-scroll true set window-title-basename true set completion-bg "#161821" -set statusbar-bg "#161821" -set statusbar-fg "#c6c8d1" set highlight-color "#a093c7" set highlight-active-color "#a093c7" set font "Terminus \(TTF\) 15"