[scripts] added everforest variants to change-theme
This commit is contained in:
parent
23d4f1bb83
commit
62fc994426
1 changed files with 52 additions and 37 deletions
|
@ -8,7 +8,6 @@ typeset -A themes
|
||||||
themes[catppuccin-latte]=\
|
themes[catppuccin-latte]=\
|
||||||
'alacritty_theme_name=catppuccin_latte
|
'alacritty_theme_name=catppuccin_latte
|
||||||
ghostty_theme_name=catppuccin-latte
|
ghostty_theme_name=catppuccin-latte
|
||||||
zsh_theme_name=catppuccin_latte
|
|
||||||
nvim_color_scheme=catppuccin-latte
|
nvim_color_scheme=catppuccin-latte
|
||||||
background_color=#eff1f5
|
background_color=#eff1f5
|
||||||
tmux_bar_unfocused_fg=#4c4f69
|
tmux_bar_unfocused_fg=#4c4f69
|
||||||
|
@ -19,7 +18,6 @@ themes[catppuccin-latte]=\
|
||||||
themes[catppuccin-frappe]=\
|
themes[catppuccin-frappe]=\
|
||||||
'alacritty_theme_name=catppuccin_frappe
|
'alacritty_theme_name=catppuccin_frappe
|
||||||
ghostty_theme_name=catppuccin-frappe
|
ghostty_theme_name=catppuccin-frappe
|
||||||
zsh_theme_name=catppuccin_frappe
|
|
||||||
nvim_color_scheme=catppuccin-frappe
|
nvim_color_scheme=catppuccin-frappe
|
||||||
background_color=#303446
|
background_color=#303446
|
||||||
tmux_bar_unfocused_fg=#c6d0f5
|
tmux_bar_unfocused_fg=#c6d0f5
|
||||||
|
@ -30,7 +28,6 @@ themes[catppuccin-frappe]=\
|
||||||
themes[gruvbox-original-hard-dark]=\
|
themes[gruvbox-original-hard-dark]=\
|
||||||
'alacritty_theme_name=gruvbox_dark
|
'alacritty_theme_name=gruvbox_dark
|
||||||
ghostty_theme_name=GruvboxDarkHard
|
ghostty_theme_name=GruvboxDarkHard
|
||||||
zsh_theme_name=gruvbox_dark
|
|
||||||
nvim_color_scheme=gruvbox-material
|
nvim_color_scheme=gruvbox-material
|
||||||
background_color=#1d2021
|
background_color=#1d2021
|
||||||
tmux_bar_unfocused_fg=#ebdbb2
|
tmux_bar_unfocused_fg=#ebdbb2
|
||||||
|
@ -43,10 +40,24 @@ vim.g.gruvbox_material_foreground=\"original\"
|
||||||
vim.opt.background=\"dark\""
|
vim.opt.background=\"dark\""
|
||||||
kitty_theme="Gruvbox Dark Hard"'
|
kitty_theme="Gruvbox Dark Hard"'
|
||||||
|
|
||||||
|
themes[gruvbox-original-medium-light]=\
|
||||||
|
'alacritty_theme_name=gruvbox_light
|
||||||
|
ghostty_theme_name=GruvboxLight
|
||||||
|
nvim_color_scheme=gruvbox-material
|
||||||
|
background_color=#fbf1c7
|
||||||
|
tmux_bar_unfocused_fg=#3c3836
|
||||||
|
tmux_bar_focused_bg=#3c3836
|
||||||
|
tmux_bar_focused_fg=#fbf1c7
|
||||||
|
additional_nvim_commands="\
|
||||||
|
vim.g.gruvbox_material_better_performance=1
|
||||||
|
vim.g.gruvbox_material_background=\"medium\"
|
||||||
|
vim.g.gruvbox_material_foreground=\"original\"
|
||||||
|
vim.opt.background=\"light\""
|
||||||
|
kitty_theme="Gruvbox Light Medium"'
|
||||||
|
|
||||||
themes[gruvbox-material-hard-dark]=\
|
themes[gruvbox-material-hard-dark]=\
|
||||||
'alacritty_theme_name=gruvbox_dark
|
'alacritty_theme_name=gruvbox_dark
|
||||||
ghostty_theme_name=gruvbox-material-hard-dark
|
ghostty_theme_name=gruvbox-material-hard-dark
|
||||||
zsh_theme_name=gruvbox_dark
|
|
||||||
nvim_color_scheme=gruvbox-material
|
nvim_color_scheme=gruvbox-material
|
||||||
background_color=#1d2021
|
background_color=#1d2021
|
||||||
tmux_bar_unfocused_fg=#d4be98
|
tmux_bar_unfocused_fg=#d4be98
|
||||||
|
@ -62,7 +73,6 @@ vim.opt.background=\"dark\""
|
||||||
themes[gruvbox-material-medium-dark]=\
|
themes[gruvbox-material-medium-dark]=\
|
||||||
'alacritty_theme_name=gruvbox_dark
|
'alacritty_theme_name=gruvbox_dark
|
||||||
ghostty_theme_name=gruvbox-material-medium-dark
|
ghostty_theme_name=gruvbox-material-medium-dark
|
||||||
zsh_theme_name=gruvbox_dark
|
|
||||||
nvim_color_scheme=gruvbox-material
|
nvim_color_scheme=gruvbox-material
|
||||||
background_color=#282828
|
background_color=#282828
|
||||||
tmux_bar_unfocused_fg=#d4be98
|
tmux_bar_unfocused_fg=#d4be98
|
||||||
|
@ -78,7 +88,6 @@ vim.opt.background=\"dark\""
|
||||||
themes[gruvbox-material-soft-dark]=\
|
themes[gruvbox-material-soft-dark]=\
|
||||||
'alacritty_theme_name=gruvbox_dark
|
'alacritty_theme_name=gruvbox_dark
|
||||||
ghostty_theme_name=gruvbox-material-soft-dark
|
ghostty_theme_name=gruvbox-material-soft-dark
|
||||||
zsh_theme_name=gruvbox_dark
|
|
||||||
nvim_color_scheme=gruvbox-material
|
nvim_color_scheme=gruvbox-material
|
||||||
background_color=#32302f
|
background_color=#32302f
|
||||||
tmux_bar_unfocused_fg=#d4be98
|
tmux_bar_unfocused_fg=#d4be98
|
||||||
|
@ -94,7 +103,6 @@ vim.opt.background=\"dark\""
|
||||||
themes[gruvbox-material-hard-light]=\
|
themes[gruvbox-material-hard-light]=\
|
||||||
'alacritty_theme_name=gruvbox_light
|
'alacritty_theme_name=gruvbox_light
|
||||||
ghostty_theme_name=gruvbox-material-hard-light
|
ghostty_theme_name=gruvbox-material-hard-light
|
||||||
zsh_theme_name=gruvbox_light
|
|
||||||
nvim_color_scheme=gruvbox-material
|
nvim_color_scheme=gruvbox-material
|
||||||
background_color=#f9f5d7
|
background_color=#f9f5d7
|
||||||
tmux_bar_unfocused_fg=#654735
|
tmux_bar_unfocused_fg=#654735
|
||||||
|
@ -110,7 +118,6 @@ vim.opt.background=\"light\""
|
||||||
themes[gruvbox-material-medium-light]=\
|
themes[gruvbox-material-medium-light]=\
|
||||||
'alacritty_theme_name=gruvbox_light
|
'alacritty_theme_name=gruvbox_light
|
||||||
ghostty_theme_name=gruvbox-material-medium-light
|
ghostty_theme_name=gruvbox-material-medium-light
|
||||||
zsh_theme_name=gruvbox_light
|
|
||||||
background_color=#fbf1c7
|
background_color=#fbf1c7
|
||||||
tmux_bar_unfocused_fg=#654735
|
tmux_bar_unfocused_fg=#654735
|
||||||
tmux_bar_focused_bg=#654735
|
tmux_bar_focused_bg=#654735
|
||||||
|
@ -126,7 +133,6 @@ vim.opt.background=\"light\""
|
||||||
themes[gruvbox-material-soft-light]=\
|
themes[gruvbox-material-soft-light]=\
|
||||||
'alacritty_theme_name=gruvbox_light
|
'alacritty_theme_name=gruvbox_light
|
||||||
ghostty_theme_name=gruvbox-material-soft-light
|
ghostty_theme_name=gruvbox-material-soft-light
|
||||||
zsh_theme_name=gruvbox_light
|
|
||||||
background_color=#f2e5bc
|
background_color=#f2e5bc
|
||||||
tmux_bar_unfocused_fg=#654735
|
tmux_bar_unfocused_fg=#654735
|
||||||
tmux_bar_focused_bg=#654735
|
tmux_bar_focused_bg=#654735
|
||||||
|
@ -139,30 +145,41 @@ vim.g.gruvbox_material_foreground=\"material\"
|
||||||
vim.opt.background=\"light\""
|
vim.opt.background=\"light\""
|
||||||
kitty_theme="Gruvbox Material Light Soft"'
|
kitty_theme="Gruvbox Material Light Soft"'
|
||||||
|
|
||||||
themes[gruvbox-original-medium-light]=\
|
themes[everforest-hard-dark]=\
|
||||||
'alacritty_theme_name=gruvbox_light
|
'ghostty_theme_name=everforest-hard-dark
|
||||||
ghostty_theme_name=GruvboxLight
|
background_color=#272e33
|
||||||
zsh_theme_name=gruvbox_light
|
tmux_bar_unfocused_fg=#3c4841
|
||||||
nvim_color_scheme=gruvbox-material
|
tmux_bar_focused_bg=#3c4841
|
||||||
background_color=#fbf1c7
|
tmux_bar_focused_fg=#d3c6aa
|
||||||
tmux_bar_unfocused_fg=#3c3836
|
nvim_color_scheme=everforest
|
||||||
tmux_bar_focused_bg=#3c3836
|
|
||||||
tmux_bar_focused_fg=#fbf1c7
|
|
||||||
additional_nvim_commands="\
|
additional_nvim_commands="\
|
||||||
vim.g.gruvbox_material_better_performance=1
|
vim.g.everforest_better_performance=1
|
||||||
vim.g.gruvbox_material_background=\"medium\"
|
vim.g.everforest_background=\"hard\"
|
||||||
vim.g.gruvbox_material_foreground=\"original\"
|
vim.opt.background=\"dark\""'
|
||||||
vim.opt.background=\"light\""
|
|
||||||
kitty_theme="Gruvbox Light Medium"'
|
themes[everforest-medium-dark]=\
|
||||||
|
'ghostty_theme_name=everforest-medium-dark
|
||||||
|
background_color=#2d353b
|
||||||
|
tmux_bar_unfocused_fg=#425047
|
||||||
|
tmux_bar_focused_bg=#425047
|
||||||
|
tmux_bar_focused_fg=#d3c6aa
|
||||||
|
nvim_color_scheme=everforest
|
||||||
|
additional_nvim_commands="\
|
||||||
|
vim.g.everforest_better_performance=1
|
||||||
|
vim.g.everforest_background=\"medium\"
|
||||||
|
vim.opt.background=\"dark\""'
|
||||||
|
|
||||||
# Function to reload Zsh sessions
|
themes[everforest-soft-dark]=\
|
||||||
reload_zsh_sessions() {
|
'ghostty_theme_name=everforest-soft-dark
|
||||||
local pids
|
background_color=#333c43
|
||||||
pids=$(pgrep zsh)
|
tmux_bar_unfocused_fg=#48584e
|
||||||
for pid in $pids; do
|
tmux_bar_focused_bg=#48584e
|
||||||
kill -USR1 "$pid" 2>/dev/null || true
|
tmux_bar_focused_fg=#d3c6aa
|
||||||
done
|
nvim_color_scheme=everforest
|
||||||
}
|
additional_nvim_commands="\
|
||||||
|
vim.g.everforest_better_performance=1
|
||||||
|
vim.g.everforest_background=\"soft\"
|
||||||
|
vim.opt.background=\"dark\""'
|
||||||
|
|
||||||
# Function to reload Neovim
|
# Function to reload Neovim
|
||||||
reload_neovim() {
|
reload_neovim() {
|
||||||
|
@ -177,21 +194,19 @@ reload_neovim() {
|
||||||
|
|
||||||
# Change common settings
|
# Change common settings
|
||||||
change_theme() {
|
change_theme() {
|
||||||
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
|
||||||
sed -i '' -e "s|source \$ZDOTDIR/themes/.*zsh|source \$ZDOTDIR/themes/${zsh_theme_name}.zsh|g" "$ZDOTDIR"/.zshrc
|
[[ -n "$ghostty_theme_name" ]] && sed -i '' -E "s/theme =.*$/theme = $ghostty_theme_name/" ~/.config/ghostty/config
|
||||||
reload_zsh_sessions
|
[[ -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_status_bar.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_status_bar.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_status_bar.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_status_bar.conf
|
||||||
tmux source-file ~/.config/tmux/tmux.conf
|
tmux source-file ~/.config/tmux/tmux.conf
|
||||||
[[ -n "$kitty_theme" ]] && kitten themes --reload-in=all "$kitty_theme"
|
|
||||||
reload_neovim "$nvim_color_scheme" "$additional_nvim_commands"
|
reload_neovim "$nvim_color_scheme" "$additional_nvim_commands"
|
||||||
sed -i '' -E "s/theme =.*$/theme = $ghostty_theme_name/" ~/.config/ghostty/config
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Menu selection
|
# Menu selection
|
||||||
theme_selection=$(printf '%s\n' "${(@k)themes}" | fzf --prompt="Select a theme: " --height=40%)
|
theme_selection=$(printf '%s\n' "${(@k)themes}" | fzf --prompt="Select a theme: ")
|
||||||
if [[ -n "$theme_selection" ]]; then
|
if [[ -n "$theme_selection" ]]; then
|
||||||
eval "${themes[$theme_selection]}"
|
eval "${themes[$theme_selection]}"
|
||||||
change_theme
|
change_theme
|
||||||
|
|
Loading…
Add table
Reference in a new issue