make alacritty switch colors

This commit is contained in:
Never Gude 2026-03-19 18:17:31 +01:00
parent 4d412a1613
commit d3e917fa09
6 changed files with 125 additions and 51 deletions

View file

@ -1,3 +1,6 @@
[general]
import = [ "gruvbox-dark.toml" ]
[window] [window]
# dynamic_padding = true # dynamic_padding = true
padding = {x = 2, y = 2} padding = {x = 2, y = 2}
@ -9,49 +12,3 @@ family = "Adwaita Mono"
bindings = [ bindings = [
{ key = "Enter", mods = "Super|Shift", action = "CreateNewWindow" } { key = "Enter", mods = "Super|Shift", action = "CreateNewWindow" }
] ]
[colors]
line_indicator = { foreground = "#ebdbb2", background = "#504945" }
footer_bar = { foreground = "#ebdbb2", background = "#504945" }
selection = { text = "CellForeground", background = "#665c54" }
# Default colors
[colors.primary]
# hard contrast background = = '#1d2021'
background = '#282828'
# soft contrast background = = '#32302f'
foreground = '#ebdbb2'
dim_foreground = '#d5c4a1'
bright_foreground = '#fbf1c7'
# Normal colors
[colors.normal]
black = '#282828'
red = '#cc241d'
green = '#98971a'
yellow = '#d79921'
blue = '#458588'
magenta = '#b16286'
cyan = '#689d6a'
white = '#a89984'
# Bright colors
[colors.bright]
black = '#928374'
red = '#fb4934'
green = '#b8bb26'
yellow = '#fabd2f'
blue = '#83a598'
magenta = '#d3869b'
cyan = '#8ec07c'
white = '#ebdbb2'
[colors.search]
matches = { foreground = "#282828", background = "#fabd2f" }
focused_match = { foreground = "#282828", background = "#fe8019" }
[colors.hints]
start = { foreground = "#282828", background = "#fe8019" }
end = { foreground = "#282828", background = "#fabd2f" }

View file

@ -0,0 +1,52 @@
# [colors]
colors.line_indicator = { foreground = "#ebdbb2", background = "#504945" }
colors.footer_bar = { foreground = "#ebdbb2", background = "#504945" }
colors.selection = { text = "CellForeground", background = "#665c54" }
# Default colors
# [colors.primary]
# hard contrast background = = '#1d2021'
colors.primary.background = '#282828'
# soft contrast background = = '#32302f'
colors.primary.foreground = '#ebdbb2'
colors.primary.dim_foreground = '#d5c4a1'
colors.primary.bright_foreground = '#fbf1c7'
# Normal colors
# [colors.normal]
colors.normal.black = '#282828'
colors.normal.red = '#cc241d'
colors.normal.green = '#98971a'
colors.normal.yellow = '#d79921'
colors.normal.blue = '#458588'
colors.normal.magenta = '#b16286'
colors.normal.cyan = '#689d6a'
colors.normal.white = '#a89984'
# Bright colors
# [colors.bright]
colors.bright.black = '#928374'
colors.bright.red = '#fb4934'
colors.bright.green = '#b8bb26'
colors.bright.yellow = '#fabd2f'
colors.bright.blue = '#83a598'
colors.bright.magenta = '#d3869b'
colors.bright.cyan = '#8ec07c'
colors.bright.white = '#ebdbb2'
colors.dim.black = '#928374'
colors.dim.red = '#9d0006'
colors.dim.green = '#79740e'
colors.dim.yellow = '#b57614'
colors.dim.blue = '#076678'
colors.dim.magenta = '#8f3f71'
colors.dim.cyan = '#427b58'
colors.dim.white = '#3c3836'
# [colors.search]
colors.search.matches = { foreground = "#282828", background = "#fabd2f" }
colors.search.focused_match = { foreground = "#282828", background = "#fe8019" }
# [colors.hints]
colors.hints.start = { foreground = "#282828", background = "#fe8019" }
colors.hints.end = { foreground = "#282828", background = "#fabd2f" }

View file

@ -0,0 +1,52 @@
# [colors]
colors.line_indicator = { foreground = "#3c3836", background = "#d5c4a1" }
colors.footer_bar = { foreground = "#ebdbb2", background = "#d5c4a1" }
colors.selection = { text = "CellForeground", background = "#bdae93" }
# Default colors
# [colors.primary]
# hard contrast background = = '#1d2021'
# soft contrast background = = '#32302f'
colors.primary.background = '#fbf1c7'
colors.primary.foreground = '#3c3836'
colors.primary.dim_foreground = '#504945'
colors.primary.bright_foreground = '#282828'
# Normal colors
# [colors.normal]
colors.normal.black = '#fbf1c7'
colors.normal.red = '#cc241d'
colors.normal.green = '#98971a'
colors.normal.yellow = '#d79921'
colors.normal.blue = '#458588'
colors.normal.magenta = '#b16286'
colors.normal.cyan = '#689d6a'
colors.normal.white = '#7c6f64'
# Bright colors
# [colors.bright]
colors.bright.black = '#928374'
colors.bright.red = '#9d0006'
colors.bright.green = '#79740e'
colors.bright.yellow = '#b57614'
colors.bright.blue = '#076678'
colors.bright.magenta = '#8f3f71'
colors.bright.cyan = '#427b58'
colors.bright.white = '#3c3836'
colors.dim.black = '#928374'
colors.dim.red = '#fb4934'
colors.dim.green = '#b8bb26'
colors.dim.yellow = '#fabd2f'
colors.dim.blue = '#83a598'
colors.dim.magenta = '#d3869b'
colors.dim.cyan = '#8ec07c'
colors.dim.white = '#ebdbb2'
# [colors.search]
colors.search.matches = { foreground = "#fbf1c7", background = "#b57614" }
colors.search.focused_match = { foreground = "#fbf1c7", background = "#af3a03" }
# [colors.hints]
colors.hints.start = { foreground = "#fbf1c7", background = "#af3a03" }
colors.hints.end = { foreground = "#fbf1c7", background = "#b57614" }

View file

@ -0,0 +1 @@
/home/never/.config/alacritty/gruvbox-light.toml

View file

@ -1,18 +1,28 @@
function fish_prompt function fish_prompt
if not set -q VIRTUAL_ENV_DISABLE_PROMPT if not set -q VIRTUAL_ENV_DISABLE_PROMPT
set -g VIRTUAL_ENV_DISABLE_PROMPT true set -g VIRTUAL_ENV_DISABLE_PROMPT true
end end
set_color brwhite --background 504945 set colorscheme (dconf read /org/gnome/desktop/interface/color-scheme)
if test $colorscheme = '\'prefer-light\''
set_color brwhite --background d5c4a1
else
set_color brwhite --background 504945
end
set -g __fish_git_prompt_show_informative_status true set -g __fish_git_prompt_show_informative_status true
printf '%s' (fish_git_prompt " %s ") printf '%s' (fish_git_prompt " %s ")
set_color white --background 3c3836 if test $colorscheme = '\'prefer-light\''
set_color white --background ebdbb2
else
set_color white --background 3c3836
end
printf ' %s ' (prompt_pwd -D 8) printf ' %s ' (prompt_pwd -D 8)
echo echo
if test -n "$VIRTUAL_ENV" if test -n "$VIRTUAL_ENV"
printf "(%s) " (set_color blue)(path basename $VIRTUAL_ENV)(set_color normal) printf "(%s) " (set_color blue)(path basename $VIRTUAL_ENV)(set_color normal)
end end
set_color normal set_color normal

View file

@ -124,9 +124,11 @@ function color_scheme
case $options[1] case $options[1]
niri msg action do-screen-transition niri msg action do-screen-transition
dconf write /org/gnome/desktop/interface/color-scheme \'prefer-light\' dconf write /org/gnome/desktop/interface/color-scheme \'prefer-light\'
command alacritty msg config -w -1 (cat /home/never/.config/alacritty/gruvbox-light.toml)
case $options[2] case $options[2]
niri msg action do-screen-transition niri msg action do-screen-transition
dconf write /org/gnome/desktop/interface/color-scheme \'prefer-dark\' dconf write /org/gnome/desktop/interface/color-scheme \'prefer-dark\'
command alacritty msg config -w -1 (cat /home/never/.config/alacritty/gruvbox-dark.toml)
end end
end end