Switch to Gruvbox as light theme

This commit is contained in:
2023-02-01 03:40:42 +01:00
parent b2f54d5d6e
commit 7fb7569e18
8 changed files with 56 additions and 106 deletions

View File

@@ -1,17 +1,21 @@
#!/bin/sh
LIGHT_THEME="gruvbox"
DARK_THEME="nord"
capitalize() {
printf '%s' "$1" | head -c 1 | tr "[:lower:]" "[:upper:]"
printf '%s' "$1" | tail -c '+2'
}
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
sed -i "s/$1/$2/" ~/.config/nvim/init.vim
sed -i "s/$1/$2/" ~/.config/zathura/zathurarc
if [ "$2" = "$LIGHT_THEME" ]; then
kitty +kitten themes --reload-in=all "$(capitalize "$2") Light"
else
kitty +kitten themes --reload-in=all "$(capitalize "$2")"
fi
nvr --remote-send ":source ~/.config/nvim/init.vim <CR>"
}
@@ -35,10 +39,10 @@ mode=$1
if [ "$mode" = "light" ]; then
emacsclient --eval "(load-theme 'doom-solarized-light 'no-confirm)"
change_theme dark light
change_theme "$DARK_THEME" "$LIGHT_THEME"
recolor_zathura
else
emacsclient --eval "(load-theme 'doom-one 'no-confirm)"
change_theme light dark
change_theme "$LIGHT_THEME" "$DARK_THEME"
recolor_zathura
fi