From 97bb290d37999535bdbcce86a74e8b177dae240e Mon Sep 17 00:00:00 2001 From: Mat Jones Date: Fri, 6 Oct 2023 12:50:28 -0400 Subject: [PATCH] feat(starship): Show '.envrc' italic in prompt when using direnv env --- home-manager/modules/starship.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/home-manager/modules/starship.nix b/home-manager/modules/starship.nix index 7551c05e..5abe491f 100644 --- a/home-manager/modules/starship.nix +++ b/home-manager/modules/starship.nix @@ -8,6 +8,7 @@ "\${custom.git_server_icon}" "$git_branch" "$git_status" + "\${custom.direnv} " "\${custom.nix_shell}" "$line_break" "$character" @@ -52,6 +53,13 @@ style = "bold #6ec2e8"; format = "[ ]($style)"; }; + direnv = { + description = "Show '.envrc' when using a direnv environment"; + when = ''[ "$DIRENV_DIR" != "" ]''; + shell = [ "bash" "--noprofile" "--norc" ]; + style = "italic #e5c07b"; + format = "[.envrc]($style)"; + }; }; }; };