From 9b1886f316c0e10c7c6000f30eb2102bbe3f2408 Mon Sep 17 00:00:00 2001 From: jc <46619361+juancwu@users.noreply.github.com> Date: Mon, 19 Aug 2024 11:57:12 -0400 Subject: [PATCH] (bash) fix toggle theme issue for alacritty --- bash/.bashrc.arch | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bash/.bashrc.arch b/bash/.bashrc.arch index 5a7ac23..feb4c82 100644 --- a/bash/.bashrc.arch +++ b/bash/.bashrc.arch @@ -274,8 +274,10 @@ toggle_theme() { 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" + if [ -L "$theme_link" ]; then + rm "$theme_link" + fi + ln -s "$HOME/ghq/alacritty/alacritty-theme/themes/$theme.toml" "$theme_link" fi }