feat(alacritty): use rose-pine for night too, avoid accidental quit, partially

This commit is contained in:
Oliver Ladner 2024-10-28 11:48:10 +01:00
commit 2f468130df
2 changed files with 5 additions and 3 deletions

View file

@ -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]

View file

@ -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