feat(starship): add cached sudo status

This commit is contained in:
matt1432 2023-10-07 14:16:51 -04:00
parent cb583bfb3b
commit 6f574f7b2d

View file

@ -11,6 +11,7 @@
"[ ](bg:#bd93f9 fg:#090c0c)" "[ ](bg:#bd93f9 fg:#090c0c)"
"[](bg:#715895 fg:#bd93f9)" "[](bg:#715895 fg:#bd93f9)"
"$username$hostname" "$username$hostname"
"$sudo"
"[](fg:#715895 bg:#382c4a)" "[](fg:#715895 bg:#382c4a)"
"$directory" "$directory"
"[](fg:#382c4a bg:#120e18)" "[](fg:#382c4a bg:#120e18)"
@ -19,9 +20,10 @@
"\n$shlvl$nix_shell$character" "\n$shlvl$nix_shell$character"
]; ];
nix_shell = { sudo = {
symbol = " "; disabled = false;
format = "[$symbol]($style)"; style = "fg:#e3e5e5 bg:#715895";
format = "[as root ]($style)";
}; };
username = { username = {
@ -36,6 +38,26 @@
format = "[@$hostname ]($style)"; format = "[@$hostname ]($style)";
}; };
directory = {
style = "fg:#bd93f9 bg:#382c4a";
format = "[ $path ]($style)";
truncate_to_repo = false;
truncation_length = 0;
substitutions = {
"Documents" = "󰈙 ";
"Downloads" = " ";
"Music" = " ";
"Pictures" = " ";
};
};
git_branch = {
style = "fg:#715895 bg:#120e18";
symbol = "";
format = "[ $symbol $branch ]($style)";
};
shlvl = { shlvl = {
disabled = false; disabled = false;
repeat = true; repeat = true;
@ -44,30 +66,15 @@
threshold = 1; threshold = 1;
}; };
nix_shell = {
symbol = " ";
format = "[$symbol]($style)";
};
character = { character = {
success_symbol = "[\\$](bold green)"; success_symbol = "[\\$](bold green)";
error_symbol = "[\\$](bold red)"; error_symbol = "[\\$](bold red)";
}; };
directory = {
style = "fg:#bd93f9 bg:#382c4a";
format = "[ $path ]($style)";
truncate_to_repo = false;
truncation_length = 0;
};
directory.substitutions = {
"Documents" = "󰈙 ";
"Downloads" = " ";
"Music" = " ";
"Pictures" = " ";
};
git_branch = {
style = "fg:#715895 bg:#120e18";
symbol = "";
format = "[ $symbol $branch ]($style)";
};
}; };
}; };