alacritty: add script to adjust alacritty theme based on macOS dark/light mode setting
This commit is contained in:
parent
69354be8fe
commit
c1fce985b8
1 changed files with 12 additions and 0 deletions
12
bin/alacritty-toggle.sh
Executable file
12
bin/alacritty-toggle.sh
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/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
|
||||
sed -i '' "s#tokyonight_day.toml#tokyonight_moon.toml#" $alacritty_config
|
||||
else
|
||||
sed -i '' "s#tokyonight_moon.toml#tokyonight_day.toml#" $alacritty_config
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue