More nix-shell kitty theme tweaks

This commit is contained in:
2024-11-24 15:13:17 -05:00
parent 81c9b10810
commit ce6113a7cd
3 changed files with 14 additions and 11 deletions

View File

@@ -21,7 +21,11 @@ in
echo "\$RESULT = $RESULT"
}
precmd() { # Reset kitty color scheme
trap 'NIX_SHELL=false kitty_theme' EXIT SIGINT SIGTERM SIGHUP
if [ "$NIX_SHELL" = "false" ]; then # don't run this in a nix-shell
trap 'NIX_SHELL=false kitty_theme' EXIT SIGINT SIGTERM SIGHUP
else # but still apply ssh theme logic in nix-shell
trap 'kitty_theme' EXIT SIGINT SIGTERM SIGHUP
fi
}
nix-shell() {
NIX_SHELL=true command nix-shell "$@" --run zsh