From 5e01947f322a672afb8219768d749761bd95331a Mon Sep 17 00:00:00 2001 From: kiana-S Date: Sat, 12 Mar 2022 20:46:41 -0500 Subject: [PATCH] Adjust starship git status --- common/home-manager/default.nix | 7 +++++-- common/home-manager/shell/starship.nix | 23 +++++++++++++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/common/home-manager/default.nix b/common/home-manager/default.nix index e76ed31..63b08f5 100644 --- a/common/home-manager/default.nix +++ b/common/home-manager/default.nix @@ -13,7 +13,10 @@ userName = "kiana-S"; userEmail = "kiana.a.sheibani@gmail.com"; - extraConfig.credential.helper = "store"; - extraConfig.git.allowForcePush = true; + extraConfig = { + credential.helper = "store"; + git.allowForcePush = true; + init.defaultBranch = "main"; + }; }; } diff --git a/common/home-manager/shell/starship.nix b/common/home-manager/shell/starship.nix index dd610f1..c11a4e0 100644 --- a/common/home-manager/shell/starship.nix +++ b/common/home-manager/shell/starship.nix @@ -4,7 +4,9 @@ programs.starship.settings = { add_newline = true; - + + battery.disabled = true; + character = let char = "⮞"; charVi = "⮜"; in { @@ -20,6 +22,23 @@ read_only_style = "cyan"; }; - battery.disabled = true; + nix_shell = { + format = "via [$symbol$name \($state\)]($style) "; + }; + + git_status = { + format = "$stashed$ahead_behind$conflicted$deleted$renamed$staged$modified$untracked"; + + conflicted = "[~$count ](red)"; + ahead = "[⇡$count ](cyan)"; + behind = "[⇣$count ](cyan)"; + diverged = "[⇕ ](cyan)"; + untracked = "[?$count ](cyan)"; + stashed = "[\$$count ](cyan)"; + modified = "[!$count ](bright-yellow)"; + staged = "[+$count ](bright-yellow)"; + renamed = "[»$count ](bright-yellow)"; + deleted = "[✘$count ](red)"; + }; }; }