From b3afcc6f87665b07912dd620c9c3e8a8f2891e0f Mon Sep 17 00:00:00 2001 From: jc <46619361+juancwu@users.noreply.github.com> Date: Fri, 9 Aug 2024 15:18:42 -0400 Subject: [PATCH] (bash) update --- bash/.bashrc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/bash/.bashrc b/bash/.bashrc index ddb7286..f71ee30 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -243,7 +243,7 @@ if [ $TERM_COLOR_MODE == "light" ]; then fi if [ $USE_TERM == "alacritty" ]; then theme_link="$HOME/.config/alacritty/theme.toml" - rm -r "$theme_link" + rm -rf "$theme_link" ln "$HOME/.config/alacritty/themes/themes/catppuccin_latte.toml" "$theme_link" fi else @@ -261,8 +261,6 @@ fi # source ~/.config/kitty/setup.sh # function to toggle kitty terminal theme toggle_theme() { - theme_link="$HOME/.config/alacritty/theme.toml" - rm -r "$theme_link" if [ "$TERM_COLOR_MODE" == "light" ]; then export TERM_COLOR_MODE=dark theme="catppuccin_latte" @@ -270,8 +268,14 @@ toggle_theme() { export TERM_COLOR_MODE=light theme="catppuccin_mocha" fi - # kitten @ set-colors --all "$HOME/.config/kitty/$TERM_COLOR_MODE.conf" - ln "$HOME/.config/alacritty/themes/themes/$theme.toml" "$theme_link" + if [ $USE_TERM == "kitty" ]; then + kitten @ set-colors --all "$HOME/.config/kitty/$TERM_COLOR_MODE.conf" + fi + if [ $USE_TERM == "alacritty" ]; then + theme_link="$HOME/.config/alacritty/theme.toml" + rm -r "$theme_link" + ln "$HOME/.config/alacritty/themes/themes/$theme.toml" "$theme_link" + fi } type -p curl >/dev/null || echo -e "$WARNING curl is not installed"