diff --git a/.gitignore b/.gitignore index 877921c..c70daba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ *.swp -alacritty/.config/alacritty/alacritty.yml +alacritty/.config/alacritty/theme.toml bin/bin diff --git a/alacritty/.config/alacritty/alacritty-base.yml b/alacritty/.config/alacritty/alacritty-base.yml deleted file mode 100644 index 5e5944e..0000000 --- a/alacritty/.config/alacritty/alacritty-base.yml +++ /dev/null @@ -1,6 +0,0 @@ -window: - opacity: 0.9 -font: - size: 14 -key_bindings: - - { key: Return, mods: Command, action: ToggleFullscreen } diff --git a/alacritty/.config/alacritty/alacritty.toml b/alacritty/.config/alacritty/alacritty.toml new file mode 100644 index 0000000..fd9f626 --- /dev/null +++ b/alacritty/.config/alacritty/alacritty.toml @@ -0,0 +1,14 @@ +import = [ + "~/.config/alacritty/theme.toml", +] + +[window] +opacity = 0.9 + +[font] +size = 14 + +[[keyboard.bindings]] +action = "ToggleFullscreen" +key = "Return" +mods = "Command" diff --git a/alacritty/.config/alacritty/themes/dark.toml b/alacritty/.config/alacritty/themes/dark.toml new file mode 100644 index 0000000..cada97d --- /dev/null +++ b/alacritty/.config/alacritty/themes/dark.toml @@ -0,0 +1,26 @@ +# Colors (Gruvbox dark) +[colors.primary] +# hard contrast = background = '0x1d2021' +background = "0x282828" +# soft contrast = background = '0x32302f' +foreground = "0xebdbb2" + +[colors.normal] +black = '0x282828' +red = '0xcc241d' +green = '0x98971a' +yellow = '0xd79921' +blue = '0x458588' +magenta = '0xb16286' +cyan = '0x689d6a' +white = '0xa89984' + +[colors.bright] +black = '0x928374' +red = '0xfb4934' +green = '0xb8bb26' +yellow = '0xfabd2f' +blue = '0x83a598' +magenta = '0xd3869b' +cyan = '0x8ec07c' +white = '0xebdbb2' diff --git a/alacritty/.config/alacritty/themes/dark.yml b/alacritty/.config/alacritty/themes/dark.yml deleted file mode 100644 index d2f4158..0000000 --- a/alacritty/.config/alacritty/themes/dark.yml +++ /dev/null @@ -1,30 +0,0 @@ -# Colors (Gruvbox dark) -colors: - # Default colors - primary: - # hard contrast: background = '0x1d2021' - background: '0x282828' - # soft contrast: background = '0x32302f' - foreground: '0xebdbb2' - - # Normal colors - normal: - black: '0x282828' - red: '0xcc241d' - green: '0x98971a' - yellow: '0xd79921' - blue: '0x458588' - magenta: '0xb16286' - cyan: '0x689d6a' - white: '0xa89984' - - # Bright colors - bright: - black: '0x928374' - red: '0xfb4934' - green: '0xb8bb26' - yellow: '0xfabd2f' - blue: '0x83a598' - magenta: '0xd3869b' - cyan: '0x8ec07c' - white: '0xebdbb2' diff --git a/alacritty/.config/alacritty/themes/light.toml b/alacritty/.config/alacritty/themes/light.toml new file mode 100644 index 0000000..9464ae5 --- /dev/null +++ b/alacritty/.config/alacritty/themes/light.toml @@ -0,0 +1,24 @@ +# Colors (Gruvbox light) +[colors.primary] +background = "0xfbf1c7" +foreground = "0x3c3836" + +[colors.normal] +black = "0xfbf1c7" +blue = "0x458588" +cyan = "0x689d6a" +green = "0x98971a" +magenta = "0xb16286" +red = "0xcc241d" +white = "0x7c6f64" +yellow = "0xd79921" + +[colors.bright] +black = "0x928374" +blue = "0x076678" +cyan = "0x427b58" +green = "0x79740e" +magenta = "0x8f3f71" +red = "0x9d0006" +white = "0x3c3836" +yellow = "0xb57614" diff --git a/alacritty/.config/alacritty/themes/light.yml b/alacritty/.config/alacritty/themes/light.yml deleted file mode 100644 index 3a10d3b..0000000 --- a/alacritty/.config/alacritty/themes/light.yml +++ /dev/null @@ -1,30 +0,0 @@ -# Colors (Gruvbox light) -colors: - # Default colors - primary: - # hard contrast: background = '0xf9f5d7' - background: '0xfbf1c7' - # soft contrast: background = '0xf2e5bc' - foreground: '0x3c3836' - - # Normal colors - normal: - black: '0xfbf1c7' - red: '0xcc241d' - green: '0x98971a' - yellow: '0xd79921' - blue: '0x458588' - magenta: '0xb16286' - cyan: '0x689d6a' - white: '0x7c6f64' - - # Bright colors - bright: - black: '0x928374' - red: '0x9d0006' - green: '0x79740e' - yellow: '0xb57614' - blue: '0x076678' - magenta: '0x8f3f71' - cyan: '0x427b58' - white: '0x3c3836' diff --git a/bin/bin/toggle-color-mode b/bin/bin/toggle-color-mode index 1856118..888e4e4 100755 --- a/bin/bin/toggle-color-mode +++ b/bin/bin/toggle-color-mode @@ -13,11 +13,10 @@ else new_color=dark fi -alacritty_header=" # Dynamically generated. Edit $HOME/.config/alacritty/alacritty-base.yml" - alacritty=$HOME/.config/alacritty/ -echo $alacritty_header > $alacritty/alacritty.yml -cat $alacritty/alacritty-base.yml $alacritty/themes/$new_color.yml >> $alacritty/alacritty.yml +ln -sf $alacritty/themes/$new_color.toml $alacritty/theme.toml +# Alacritty does not notice update of imported symlink +touch $alacritty/alacritty.toml echo $new_color > $color_file