diff --git a/config/alacritty/alacritty.toml b/config/alacritty/alacritty.toml index 1d1c5f0..26c669e 100644 --- a/config/alacritty/alacritty.toml +++ b/config/alacritty/alacritty.toml @@ -1,26 +1,6 @@ -[colors.bright] -black = "0x414868" -blue = "0x7aa2f7" -cyan = "0x7dcfff" -green = "0x9ece6a" -magenta = "0xbb9af7" -red = "0xf7768e" -white = "0xc0caf5" -yellow = "0xe0af68" - -[colors.normal] -black = "0x1d202f" -blue = "0x7aa2f7" -cyan = "0x7dcfff" -green = "0x9ece6a" -magenta = "0xbb9af7" -red = "0xf7768e" -white = "0xa9b1d6" -yellow = "0xe0af68" - -[colors.primary] -background = "0x24283b" -foreground = "0xc0caf5" +import = [ + "~/.dotfiles/config/alacritty/theme-active.toml" +] [env] TERM = "xterm-256color" diff --git a/config/alacritty/change-theme.sh b/config/alacritty/change-theme.sh new file mode 100755 index 0000000..142eb5a --- /dev/null +++ b/config/alacritty/change-theme.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# Adapted from https://gist.github.com/xqm32/17777d035930d622d0ff7530bfab61fd +# + +A_DIR="$HOME/.dotfiles/config/alacritty" + +set_alacritty_theme() { + cp -f "$A_DIR/theme-$1.toml" "$A_DIR/theme-active.toml" +} +ALACRITTY_THEME=$1 +if [ "$ALACRITTY_THEME" = "dark" ] || [ "$ALACRITTY_THEME" = "night" ]; then + set_alacritty_theme "night" +else + set_alacritty_theme "day" +fi + +# Notify alacritty about the changes +touch "$A_DIR/alacritty.toml" + diff --git a/config/alacritty/theme-active.toml b/config/alacritty/theme-active.toml new file mode 100644 index 0000000..20cf1ef --- /dev/null +++ b/config/alacritty/theme-active.toml @@ -0,0 +1,40 @@ +# TokyoNight Alacritty Colors: Day +# Default colors +[colors.primary] +background = '#e1e2e7' +foreground = '#3760bf' + +#[colors.cursor] +#cursor = '#3760bf' +#text = '#e1e2e7' + +# Normal colors +[colors.normal] +black = '#e9e9ed' +red = '#f52a65' +green = '#587539' +yellow = '#8c6c3e' +blue = '#2e7de9' +magenta = '#9854f1' +cyan = '#007197' +white = '#6172b0' + +# Bright colors +[colors.bright] +black = '#a1a6c5' +red = '#f52a65' +green = '#587539' +yellow = '#8c6c3e' +blue = '#2e7de9' +magenta = '#9854f1' +cyan = '#007197' +white = '#3760bf' + +# Indexed Colors +[[colors.indexed_colors]] +index = 16 +color = '#b15c00' + +[[colors.indexed_colors]] +index = 17 +color = '#c64343' diff --git a/config/alacritty/theme-day.toml b/config/alacritty/theme-day.toml new file mode 100644 index 0000000..20cf1ef --- /dev/null +++ b/config/alacritty/theme-day.toml @@ -0,0 +1,40 @@ +# TokyoNight Alacritty Colors: Day +# Default colors +[colors.primary] +background = '#e1e2e7' +foreground = '#3760bf' + +#[colors.cursor] +#cursor = '#3760bf' +#text = '#e1e2e7' + +# Normal colors +[colors.normal] +black = '#e9e9ed' +red = '#f52a65' +green = '#587539' +yellow = '#8c6c3e' +blue = '#2e7de9' +magenta = '#9854f1' +cyan = '#007197' +white = '#6172b0' + +# Bright colors +[colors.bright] +black = '#a1a6c5' +red = '#f52a65' +green = '#587539' +yellow = '#8c6c3e' +blue = '#2e7de9' +magenta = '#9854f1' +cyan = '#007197' +white = '#3760bf' + +# Indexed Colors +[[colors.indexed_colors]] +index = 16 +color = '#b15c00' + +[[colors.indexed_colors]] +index = 17 +color = '#c64343' diff --git a/config/alacritty/theme-night.toml b/config/alacritty/theme-night.toml new file mode 100644 index 0000000..816d002 --- /dev/null +++ b/config/alacritty/theme-night.toml @@ -0,0 +1,40 @@ +# TokyoNight Alacritty Colors: Storm +# Default colors +[colors.primary] +background = '#24283b' +foreground = '#c0caf5' + +#[colors.cursor] +#cursor = '#c0caf5' +#text = '#24283b' + +# Normal colors +[colors.normal] +black = '#1d202f' +red = '#f7768e' +green = '#9ece6a' +yellow = '#e0af68' +blue = '#7aa2f7' +magenta = '#bb9af7' +cyan = '#7dcfff' +white = '#a9b1d6' + +# Bright colors +[colors.bright] +black = '#414868' +red = '#f7768e' +green = '#9ece6a' +yellow = '#e0af68' +blue = '#7aa2f7' +magenta = '#bb9af7' +cyan = '#7dcfff' +white = '#c0caf5' + +# Indexed Colors +[[colors.indexed_colors]] +index = 16 +color = '#ff9e64' + +[[colors.indexed_colors]] +index = 17 +color = '#db4b4b'