diff options
author | Zhongheng Liu <z.liu@outlook.com.gr> | 2024-12-07 19:25:24 +0200 |
---|---|---|
committer | Zhongheng Liu <z.liu@outlook.com.gr> | 2024-12-07 19:25:24 +0200 |
commit | df966578e45372b4e06fdc56685580312ed31c0d (patch) | |
tree | 227439a5f3d1d062fc9456cbeec2badd66a93b64 | |
parent | 73b4ab6874ba799894f2e4e1993ca9690e5b94d8 (diff) | |
download | nixos-configuration-df966578e45372b4e06fdc56685580312ed31c0d.tar.gz nixos-configuration-df966578e45372b4e06fdc56685580312ed31c0d.tar.bz2 nixos-configuration-df966578e45372b4e06fdc56685580312ed31c0d.zip |
feat: starship integration and theme change
theme of starship changed to pure preset
integrated starship into nushell
-rw-r--r-- | home-manager/stvnliu/shells/starship/default.nix | 2 | ||||
-rw-r--r-- | home-manager/stvnliu/shells/starship/presets/pure-direnv.toml | 52 |
2 files changed, 54 insertions, 0 deletions
diff --git a/home-manager/stvnliu/shells/starship/default.nix b/home-manager/stvnliu/shells/starship/default.nix index ef91a38..3cf3aed 100644 --- a/home-manager/stvnliu/shells/starship/default.nix +++ b/home-manager/stvnliu/shells/starship/default.nix @@ -15,10 +15,12 @@ in }; }; config = mkIf cfg.enable { + myShells.prompts.starship.confPath = ./presets/pure-direnv.toml; programs.starship = { enable = true; enableZshIntegration = config.myShells.zsh.enable; enableFishIntegration = config.myShells.fish.enable; + enableNushellIntegration = config.myShells.nushell.enable; settings = builtins.fromTOML (builtins.readFile cfg.confPath); }; }; diff --git a/home-manager/stvnliu/shells/starship/presets/pure-direnv.toml b/home-manager/stvnliu/shells/starship/presets/pure-direnv.toml new file mode 100644 index 0000000..2b80582 --- /dev/null +++ b/home-manager/stvnliu/shells/starship/presets/pure-direnv.toml @@ -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" |