From 2f468130df8b7dee3f1507de3c6997019b64adf5 Mon Sep 17 00:00:00 2001 From: Oliver Ladner Date: Mon, 28 Oct 2024 11:48:10 +0100 Subject: [PATCH] feat(alacritty): use rose-pine for night too, avoid accidental quit, partially --- .config/alacritty/alacritty.toml | 4 +++- bin/alacritty-toggle.sh | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.config/alacritty/alacritty.toml b/.config/alacritty/alacritty.toml index bf98827..7c536b9 100644 --- a/.config/alacritty/alacritty.toml +++ b/.config/alacritty/alacritty.toml @@ -12,7 +12,7 @@ # selection (Ctrl v). You can also toggle between them while the selection is # still active. -import = ["~/.config/alacritty/rose-pine-dawn.toml"] +import = ["~/.config/alacritty/rose-pine-moon.toml"] [font] normal = { family = "JetBrainsMono Nerd Font", style = "Thin" } @@ -55,6 +55,8 @@ bindings = [ { key = "Minus", mods = "Command", action = "DecreaseFontSize" }, { key = "PageUp", mods = "Shift", action = "ScrollPageUp" }, { key = "PageDown", mods = "Shift", action = "ScrollPageDown" }, + # Disable Cmd+w to avoid accidental closing. Disabling Cmd+q needs more work + { key = "w", mods = "Command", action = "None" }, ] #[mouse] diff --git a/bin/alacritty-toggle.sh b/bin/alacritty-toggle.sh index d75b9a1..6624aa9 100755 --- a/bin/alacritty-toggle.sh +++ b/bin/alacritty-toggle.sh @@ -6,7 +6,7 @@ mode=$(defaults read -g AppleInterfaceStyle 2>/dev/null || echo "Light") alacritty_config=~/.config/alacritty/alacritty.toml if [ "$mode" = "Dark" ]; then - sed -i '' "s#rose-pine-dawn.toml#tokyonight_moon.toml#" $alacritty_config + sed -i '' "s#rose-pine-dawn.toml#rose-pine-moon.toml#" $alacritty_config else - sed -i '' "s#tokyonight_moon.toml#rose-pine-dawn.toml#" $alacritty_config + sed -i '' "s#rose-pine-moon.toml#rose-pine-dawn.toml#" $alacritty_config fi