feat: starship integration and theme change

theme of starship changed to pure preset
integrated starship into nushell
This commit is contained in:
Zhongheng Liu 2024-12-07 19:25:24 +02:00
commit df966578e4
Signed by: steven
GPG key ID: 805A28B071DAD84B
2 changed files with 54 additions and 0 deletions

View file

@ -15,10 +15,12 @@ in
}; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
myShells.prompts.starship.confPath = ./presets/pure-direnv.toml;
programs.starship = { programs.starship = {
enable = true; enable = true;
enableZshIntegration = config.myShells.zsh.enable; enableZshIntegration = config.myShells.zsh.enable;
enableFishIntegration = config.myShells.fish.enable; enableFishIntegration = config.myShells.fish.enable;
enableNushellIntegration = config.myShells.nushell.enable;
settings = builtins.fromTOML (builtins.readFile cfg.confPath); settings = builtins.fromTOML (builtins.readFile cfg.confPath);
}; };
}; };

View file

@ -0,0 +1,52 @@
format = """
${direnv}\
$username\
$hostname\
$directory\
$git_branch\
$git_state\
$git_status\
$cmd_duration\
$line_break\
$python\
$character"""
[direnv]
disabled = false
#command = '[[ $(direnv status) =~ "Found RC allowed false" ]] && echo "=========> missing: direnv allow <============"' # shows output of command
detect_files = ['.envrc'] # can specify filters but wildcards are not supported
[directory]
style = "blue"
[character]
success_symbol = "[](purple)"
error_symbol = "[](red)"
vimcmd_symbol = "[](green)"
[git_branch]
format = "[$branch]($style)"
style = "bright-black"
[git_status]
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"
style = "cyan"
conflicted = ""
untracked = ""
modified = ""
staged = ""
renamed = ""
deleted = ""
stashed = "≡"
[git_state]
format = '\([$state( $progress_current/$progress_total)]($style)\) '
style = "bright-black"
[cmd_duration]
format = "[$duration]($style) "
style = "yellow"
[python]
format = "[$virtualenv]($style) "
style = "bright-black"