forked from colonelpanic/dotfiles
[NixOS] Use starship instead of spaceship-prompt
This commit is contained in:
parent
fc41bcef17
commit
88519e1c98
6
dotfiles/config/starship.toml
Normal file
6
dotfiles/config/starship.toml
Normal 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"
|
@ -20,7 +20,6 @@ with lib;
|
|||||||
enable = true;
|
enable = true;
|
||||||
plugins = [ "git" "sudo" "pip" ];
|
plugins = [ "git" "sudo" "pip" ];
|
||||||
};
|
};
|
||||||
spaceship-prompt.enable = true;
|
|
||||||
shellInit = ''
|
shellInit = ''
|
||||||
fpath+="${libDir}/functions"
|
fpath+="${libDir}/functions"
|
||||||
for file in "${libDir}/functions/"*
|
for file in "${libDir}/functions/"*
|
||||||
@ -30,9 +29,34 @@ with lib;
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.starship = {
|
||||||
|
enableBashIntegration = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
homeBinInPath = true;
|
homeBinInPath = true;
|
||||||
localBinInPath = 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 = ''
|
extraInit = ''
|
||||||
export ROFI_SYSTEMD_TERM="alacritty -e"
|
export ROFI_SYSTEMD_TERM="alacritty -e"
|
||||||
export PATH="${libDir}/bin:$PATH"
|
export PATH="${libDir}/bin:$PATH"
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit b489ee61aeb6a993deba88ce8e205b50a3ddcc0d
|
Subproject commit 4dc506e273b9c2f29b3f07631bf8f2bc9ed01802
|
Loading…
Reference in New Issue
Block a user