chore(scripts): update change-theme.sh

This commit is contained in:
Afonso Franco 2025-03-16 01:14:58 +00:00
parent 91a40246c2
commit 9db6a18c28
Signed by: afonso
SSH key fingerprint: SHA256:gkVPzsQQJzqi21ntQBV6pXTx4bYI53rFGI4XtvCpwd4

View file

@ -154,6 +154,7 @@ themes[everforest-hard-dark]=\
nvim_color_scheme=everforest nvim_color_scheme=everforest
additional_nvim_commands="\ additional_nvim_commands="\
vim.g.everforest_better_performance=1 vim.g.everforest_better_performance=1
vim.g.everforest_transparent_background=2
vim.g.everforest_background=\"hard\" vim.g.everforest_background=\"hard\"
vim.opt.background=\"dark\""' vim.opt.background=\"dark\""'
@ -166,6 +167,7 @@ themes[everforest-medium-dark]=\
nvim_color_scheme=everforest nvim_color_scheme=everforest
additional_nvim_commands="\ additional_nvim_commands="\
vim.g.everforest_better_performance=1 vim.g.everforest_better_performance=1
vim.g.everforest_transparent_background=2
vim.g.everforest_background=\"medium\" vim.g.everforest_background=\"medium\"
vim.opt.background=\"dark\""' vim.opt.background=\"dark\""'
@ -179,6 +181,7 @@ themes[everforest-soft-dark]=\
additional_nvim_commands="\ additional_nvim_commands="\
vim.g.everforest_better_performance=1 vim.g.everforest_better_performance=1
vim.g.everforest_background=\"soft\" vim.g.everforest_background=\"soft\"
vim.g.everforest_transparent_background=2
vim.opt.background=\"dark\""' vim.opt.background=\"dark\""'
# Function to reload Neovim # Function to reload Neovim
@ -197,10 +200,10 @@ change_theme() {
[[ -n "$alacritty_theme_name" ]] && sed -i '' -e "s|import = \[\"~/.config/alacritty/themes/.*\"\]|import = [\"~/.config/alacritty/themes/${alacritty_theme_name}.toml\"]|g" ~/.config/alacritty/alacritty.toml [[ -n "$alacritty_theme_name" ]] && sed -i '' -e "s|import = \[\"~/.config/alacritty/themes/.*\"\]|import = [\"~/.config/alacritty/themes/${alacritty_theme_name}.toml\"]|g" ~/.config/alacritty/alacritty.toml
[[ -n "$ghostty_theme_name" ]] && sed -i '' -E "s/theme =.*$/theme = $ghostty_theme_name/" ~/.config/ghostty/config [[ -n "$ghostty_theme_name" ]] && sed -i '' -E "s/theme =.*$/theme = $ghostty_theme_name/" ~/.config/ghostty/config
[[ -n "$kitty_theme" ]] && kitten themes --reload-in=all "$kitty_theme" [[ -n "$kitty_theme" ]] && kitten themes --reload-in=all "$kitty_theme"
sed -i '' -E "s/set -g status-bg .*$/set -g status-bg \"$background_color\"/" ~/.config/tmux/tmux_status_bar.conf sed -i '' -E "s/set -g status-bg .*$/set -g status-bg \"$background_color\"/" ~/.config/tmux/tmux.conf
sed -i '' -E "s/set -g @unfocused-fg .*$/set -g @unfocused-fg \"$tmux_bar_unfocused_fg\"/" ~/.config/tmux/tmux_status_bar.conf sed -i '' -E "s/set -g @unfocused-fg .*$/set -g @unfocused-fg \"$tmux_bar_unfocused_fg\"/" ~/.config/tmux/tmux.conf
sed -i '' -E "s/set -g @focused-bg .*$/set -g @focused-bg \"$tmux_bar_focused_bg\"/" ~/.config/tmux/tmux_status_bar.conf sed -i '' -E "s/set -g @focused-bg .*$/set -g @focused-bg \"$tmux_bar_focused_bg\"/" ~/.config/tmux/tmux.conf
sed -i '' -E "s/set -g @focused-fg .*$/set -g @focused-fg \"$tmux_bar_focused_fg\"/" ~/.config/tmux/tmux_status_bar.conf sed -i '' -E "s/set -g @focused-fg .*$/set -g @focused-fg \"$tmux_bar_focused_fg\"/" ~/.config/tmux/tmux.conf
tmux source-file ~/.config/tmux/tmux.conf tmux source-file ~/.config/tmux/tmux.conf
reload_neovim "$nvim_color_scheme" "$additional_nvim_commands" reload_neovim "$nvim_color_scheme" "$additional_nvim_commands"
} }