From 0241b99f9f0c1db984b08f1540f9d4ef81853446 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Wed, 23 Jul 2025 14:07:35 -0500 Subject: [PATCH 1/3] fix obnoxious direnv prompt --- programs/starship.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/programs/starship.nix b/programs/starship.nix index a353d6e..f14722a 100644 --- a/programs/starship.nix +++ b/programs/starship.nix @@ -1,5 +1,5 @@ { lib }: -let language-format-string = "[$symbol($version )]($style)"; +let language-format-string = " [$symbol($version )]($style)"; in { enable = true; @@ -11,13 +11,14 @@ in { "$os" " " "($container )" + "($direnv)" "\\[" "([$username](bold yellow)@[$hostname](bold red) )" "[$directory](cyan)" "($git_branch$git_commit$git_state$git_metrics$git_status)" "\\] " "($package)" - "($conda$direnv$julia$nix_shell$nodejs$python$quarto$rlang$ruby)" + "($conda$julia$nix_shell$nodejs$python$quarto$rlang$ruby)" "($shell)" "$character" ]; @@ -26,6 +27,15 @@ in { success_symbol = "[\\$](bold green)"; error_symbol = "[\\$](bold red)"; }; + direnv = { + disabled = false; + allowed_msg = ""; + not_allowed_msg = ""; + denied_msg = ""; + loaded_msg = ""; + unloaded_msg = ""; + symbol = " "; + }; git_metrics = { disabled = false; }; git_status = { # Remove trailing space from format string From a1728baede365b74ff2caacdd8418acd3415182c Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Wed, 23 Jul 2025 14:08:29 -0500 Subject: [PATCH 2/3] Remove package directive from shell prompt --- programs/starship.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/programs/starship.nix b/programs/starship.nix index f14722a..9bdd258 100644 --- a/programs/starship.nix +++ b/programs/starship.nix @@ -17,7 +17,6 @@ in { "[$directory](cyan)" "($git_branch$git_commit$git_state$git_metrics$git_status)" "\\] " - "($package)" "($conda$julia$nix_shell$nodejs$python$quarto$rlang$ruby)" "($shell)" "$character" @@ -62,10 +61,6 @@ in { NixOS = ""; }; }; - package = { - format = language-format-string; - symbol = " "; - }; python = { format = "[\${symbol}\${pyenv_prefix}(\${version} )(($virtualenv) )]($style)"; From cc1b2c8132309277d46b4063df5cf5818af09ae2 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Wed, 23 Jul 2025 14:14:43 -0500 Subject: [PATCH 3/3] Move global package managers to front of prompt --- programs/starship.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/programs/starship.nix b/programs/starship.nix index 9bdd258..9dd0078 100644 --- a/programs/starship.nix +++ b/programs/starship.nix @@ -17,7 +17,8 @@ in { "[$directory](cyan)" "($git_branch$git_commit$git_state$git_metrics$git_status)" "\\] " - "($conda$julia$nix_shell$nodejs$python$quarto$rlang$ruby)" + "($conda$nix_shell)" + "($julia$nodejs$python$quarto$rlang$ruby)" "($shell)" "$character" ]; @@ -26,6 +27,7 @@ in { success_symbol = "[\\$](bold green)"; error_symbol = "[\\$](bold red)"; }; + conda = { format = "[$symbol$environment]($style) "; }; direnv = { disabled = false; allowed_msg = ""; @@ -46,7 +48,7 @@ in { symbol = ""; impure_msg = "/󰓑"; pure_msg = "/󱕦"; - format = "[$symbol$state( ($name))]($style)"; + format = "[$symbol$state( ($name))]($style) "; }; nodejs = { format = language-format-string; }; os = {