1
0

Enable starship for zsh only

This commit is contained in:
clerie 2022-07-11 23:22:12 +02:00
parent c653e9e127
commit b86b8efa9c

View File

@ -35,6 +35,10 @@
enableBashCompletion = true; enableBashCompletion = true;
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
promptInit = '' 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} source ~/.zkbd/$TERM-''${''${DISPLAY:t}:-$VENDOR-$OSTYPE}
[[ -n ''${key[Left]} ]] && bindkey "''${key[Left]}" backward-char [[ -n ''${key[Left]} ]] && bindkey "''${key[Left]}" backward-char
[[ -n ''${key[Right]} ]] && bindkey "''${key[Right]}" forward-char [[ -n ''${key[Right]} ]] && bindkey "''${key[Right]}" forward-char
@ -48,7 +52,6 @@
eval "$(starship init zsh)" eval "$(starship init zsh)"
''; '';
}; };
programs.starship.enable = true;
programs.mtr.enable = true; programs.mtr.enable = true;
nix.settings = { nix.settings = {