diff --git a/dotfiles/config/starship.toml b/dotfiles/config/starship.toml new file mode 100644 index 00000000..39113f18 --- /dev/null +++ b/dotfiles/config/starship.toml @@ -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" diff --git a/nixos/environment.nix b/nixos/environment.nix index 144441e9..b64cec91 100644 --- a/nixos/environment.nix +++ b/nixos/environment.nix @@ -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" diff --git a/nixos/nixpkgs b/nixos/nixpkgs index b489ee61..4dc506e2 160000 --- a/nixos/nixpkgs +++ b/nixos/nixpkgs @@ -1 +1 @@ -Subproject commit b489ee61aeb6a993deba88ce8e205b50a3ddcc0d +Subproject commit 4dc506e273b9c2f29b3f07631bf8f2bc9ed01802