diff --git a/.gitignore b/.gitignore index 877921c..6c84203 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ *.swp -alacritty/.config/alacritty/alacritty.yml +alacritty/.config/alacritty/alacritty.toml bin/bin diff --git a/alacritty/.config/alacritty/alacritty-base.toml b/alacritty/.config/alacritty/alacritty-base.toml new file mode 100644 index 0000000..685c6f5 --- /dev/null +++ b/alacritty/.config/alacritty/alacritty-base.toml @@ -0,0 +1,10 @@ +[window] +opacity = 0.9 + +[font] +size = 14 + +[[keyboard.bindings]] +action = "ToggleFullscreen" +key = "Return" +mods = "Command" 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/themes/dark.toml b/alacritty/.config/alacritty/themes/dark.toml new file mode 100644 index 0000000..cbcbbe4 --- /dev/null +++ b/alacritty/.config/alacritty/themes/dark.toml @@ -0,0 +1,27 @@ +# 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' + + # Bright colors +[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..d4ab5e3 --- /dev/null +++ b/alacritty/.config/alacritty/themes/light.toml @@ -0,0 +1,24 @@ +# Colors (Gruvbox light) +[colors.bright] +black = "0x928374" +blue = "0x076678" +cyan = "0x427b58" +green = "0x79740e" +magenta = "0x8f3f71" +red = "0x9d0006" +white = "0x3c3836" +yellow = "0xb57614" + +[colors.normal] +black = "0xfbf1c7" +blue = "0x458588" +cyan = "0x689d6a" +green = "0x98971a" +magenta = "0xb16286" +red = "0xcc241d" +white = "0x7c6f64" +yellow = "0xd79921" + +[colors.primary] +background = "0xfbf1c7" +foreground = "0x3c3836" 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..64e0af0 100755 --- a/bin/bin/toggle-color-mode +++ b/bin/bin/toggle-color-mode @@ -1,6 +1,6 @@ #!/bin/bash -color_file=$HOME/.config/$USER/color.yml +color_file=$HOME/.config/$USER/color.toml if ! test -f $color_file; then mkdir -p $HOME/.config/$USER echo light > $color_file @@ -13,11 +13,11 @@ else new_color=dark fi -alacritty_header=" # Dynamically generated. Edit $HOME/.config/alacritty/alacritty-base.yml" +alacritty_header=" # Dynamically generated. Edit $HOME/.config/alacritty/alacritty-base.toml" alacritty=$HOME/.config/alacritty/ -echo $alacritty_header > $alacritty/alacritty.yml -cat $alacritty/alacritty-base.yml $alacritty/themes/$new_color.yml >> $alacritty/alacritty.yml +echo $alacritty_header > $alacritty/alacritty.toml +cat $alacritty/alacritty-base.toml $alacritty/themes/$new_color.toml >> $alacritty/alacritty.toml echo $new_color > $color_file @@ -26,6 +26,7 @@ if tmux info &> /dev/null; then IFS=- read pane cmd <<< "$pane_info" if [[ $cmd == "vim" || $cmd == "nvim" ]]; then + echo "SEND TMUX" tmux send-keys -t $pane ":lua ChangeBackground()" ENTER fi done