[NixOS] Use starship instead of spaceship-prompt

This commit is contained in:
Ivan Malison 2021-08-05 19:06:57 -06:00
parent fc41bcef17
commit 88519e1c98
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8
3 changed files with 32 additions and 2 deletions

View File

@ -0,0 +1,6 @@
# Inserts a blank line between shell prompts
add_newline = true
# Replace the "" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character"
success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green"

View File

@ -20,7 +20,6 @@ with lib;
enable = true;
plugins = [ "git" "sudo" "pip" ];
};
spaceship-prompt.enable = true;
shellInit = ''
fpath+="${libDir}/functions"
for file in "${libDir}/functions/"*
@ -30,9 +29,34 @@ with lib;
'';
};
programs.starship = {
enableBashIntegration = true;
enableZshIntegration = true;
enable = true;
};
environment = {
homeBinInPath = true;
localBinInPath = true;
interactiveShellInit = ''
vterm_printf(){
if [ -n "$TMUX" ] && ([ "''${TERM%%-*}" = "tmux" ] || [ "''${TERM%%-*}" = "screen" ] ); then
# Tell tmux to pass the escape sequences through
printf "\ePtmux;\e\e]%s\007\e\\" "$1"
elif [ "''${TERM%%-*}" = "screen" ]; then
# GNU screen (screen, screen-256color, screen-256color-bce)
printf "\eP\e]%s\007\e\\" "$1"
else
printf "\e]%s\e\\" "$1"
fi
}
if [[ "$INSIDE_EMACS" = 'vterm' ]] \
&& [[ -n ''${EMACS_VTERM_PATH} ]] \
&& [[ -f ''${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh ]]; then
source ''${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh
fi
export STARSHIP_INSIDE_EMACS="yes"
'';
extraInit = ''
export ROFI_SYSTEMD_TERM="alacritty -e"
export PATH="${libDir}/bin:$PATH"

@ -1 +1 @@
Subproject commit b489ee61aeb6a993deba88ce8e205b50a3ddcc0d
Subproject commit 4dc506e273b9c2f29b3f07631bf8f2bc9ed01802