From b86b8efa9cbe703cb04da093d8554176c7f0f3f7 Mon Sep 17 00:00:00 2001 From: clerie Date: Mon, 11 Jul 2022 23:22:12 +0200 Subject: [PATCH] Enable starship for zsh only --- common/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/default.nix b/common/default.nix index a15c385..55263e0 100644 --- a/common/default.nix +++ b/common/default.nix @@ -35,6 +35,10 @@ enableBashCompletion = true; syntaxHighlighting.enable = true; promptInit = '' + if [[ $TERM != "dumb" && (-z $INSIDE_EMACS || $INSIDE_EMACS == "vterm") ]]; then + eval "$(${pkgs.starship}/bin/starship init zsh)" + fi + source ~/.zkbd/$TERM-''${''${DISPLAY:t}:-$VENDOR-$OSTYPE} [[ -n ''${key[Left]} ]] && bindkey "''${key[Left]}" backward-char [[ -n ''${key[Right]} ]] && bindkey "''${key[Right]}" forward-char @@ -48,7 +52,6 @@ eval "$(starship init zsh)" ''; }; - programs.starship.enable = true; programs.mtr.enable = true; nix.settings = {