dotfiles/bin/alacritty-toggle.sh

12 lines
415 B
Bash
Raw Normal View History

#!/usr/bin/env bash
#
# Adjusts Alacritty color scheme to match macOS dark/light mode setting
mode=$(defaults read -g AppleInterfaceStyle 2>/dev/null || echo "Light")
alacritty_config=~/.config/alacritty/alacritty.toml
if [ "$mode" = "Dark" ]; then
2024-09-23 10:23:52 +02:00
sed -i '' "s#rose-pine-dawn.toml#tokyonight_moon.toml#" $alacritty_config
else
2024-09-23 10:23:52 +02:00
sed -i '' "s#tokyonight_moon.toml#rose-pine-dawn.toml#" $alacritty_config
fi