add setup script for kitty in mac

This commit is contained in:
jc 2024-06-07 13:55:57 -04:00
commit ebef0c399a
No known key found for this signature in database
2 changed files with 32 additions and 0 deletions

View file

@ -156,6 +156,19 @@ PS1="%n@%m:%~ $ "
unset color_prompt
# setup kitty, it will export TERM_COLOR_MODE (can be light or dark)
source ~/.config/kitty/setup.sh
# function to toggle kitty terminal theme
toggle_theme() {
if [ "$TERM_COLOR_MODE" == "light" ]; then
export TERM_COLOR_MODE=dark
kitten @ set-colors --all "$HOME/.config/kitty/dark.conf"
else
export TERM_COLOR_MODE=light
kitten @ set-colors --all "$HOME/.config/kitty/light.conf"
fi
}
type -p curl >/dev/null || echo -e "$WARNING curl is not installed"
command -v nvm > /dev/null 2>&1