From 074c169e3c9dc0e3745b241667891b90fa244d25 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Thu, 20 Jun 2024 00:36:01 +0300 Subject: [PATCH] feat(alacritty): theme changing improvements --- .gitignore | 1 + config/alacritty/alacritty.toml | 4 +- config/alacritty/theme-active.toml | 40 ------------------- .../bin/x-change-alacritty-theme | 2 +- 4 files changed, 5 insertions(+), 42 deletions(-) delete mode 100644 config/alacritty/theme-active.toml rename config/alacritty/change-theme.sh => local/bin/x-change-alacritty-theme (91%) diff --git a/.gitignore b/.gitignore index ef2e2b8..bcce1b1 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ config/cheat/cheatsheets/tldr/* config/git/credentials config/npm/npmrc config/zsh/.zcompdump +config/alacritty/theme-active.toml ssh/local.d/* !ssh/local.d/.gitkeep !.gitkeep diff --git a/config/alacritty/alacritty.toml b/config/alacritty/alacritty.toml index 26c669e..43ee673 100644 --- a/config/alacritty/alacritty.toml +++ b/config/alacritty/alacritty.toml @@ -1,5 +1,7 @@ import = [ - "~/.dotfiles/config/alacritty/theme-active.toml" + # Default to night if the copied one doesn't exist. + "~/.dotfiles/config/alacritty/theme-night.toml", + "~/.config/alacritty/theme-active.toml" ] [env] diff --git a/config/alacritty/theme-active.toml b/config/alacritty/theme-active.toml deleted file mode 100644 index 20cf1ef..0000000 --- a/config/alacritty/theme-active.toml +++ /dev/null @@ -1,40 +0,0 @@ -# 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/change-theme.sh b/local/bin/x-change-alacritty-theme similarity index 91% rename from config/alacritty/change-theme.sh rename to local/bin/x-change-alacritty-theme index 142eb5a..08d35ea 100755 --- a/config/alacritty/change-theme.sh +++ b/local/bin/x-change-alacritty-theme @@ -2,7 +2,7 @@ # Adapted from https://gist.github.com/xqm32/17777d035930d622d0ff7530bfab61fd # -A_DIR="$HOME/.dotfiles/config/alacritty" +A_DIR="$HOME/.config/alacritty" set_alacritty_theme() { cp -f "$A_DIR/theme-$1.toml" "$A_DIR/theme-active.toml"