Skip to content

Commit

Permalink
chore(prompt): show git status on prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
pwnwriter committed Nov 16, 2024
1 parent be3d462 commit 1d82e98
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion modules/starship.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ in
settings = {
scan_timeout = 10;

format = lib.concatStrings [ "$directory$git_branch$character" ];
format = lib.concatStrings [ "$directory$git_branch$git_status$character" ];

right_format = lib.concatStrings [ "$nix_shell" ];

Expand All @@ -54,6 +54,23 @@ in
truncation_symbol = "…/";
style = "bold green";
};

git_status = {
format = "[\\($all_status$ahead_behind\\)]($style) ";
style = "bold green";
conflicted = "σ±ƒž";
up_to_date = " ";
untracked = "ο”© ";
ahead = "⇑\${count}";
diverged = "⇕⇑\${ahead_count}⇣\${behind_count}";
behind = "⇣\${count}";
stashed = "󰏗 ";
modified = " ";
staged = "[++\\($count\\)](green)";
renamed = "σ°–· ";
deleted = "ο€” ";
};

};
};
}

0 comments on commit 1d82e98

Please sign in to comment.