add: starship prompt

This commit is contained in:
lily 2024-09-26 16:28:53 -04:00
parent 9740a6b460
commit 24162ced33
Signed by: lily
GPG key ID: 601F3263FBCBC4B9

View file

@ -48,97 +48,52 @@
''; '';
}; };
programs.oh-my-posh = { programs.starship = {
enable = true; enable = true;
enableZshIntegration = true;
settings = { settings = {
"$schema" = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json"; format = "$username$hostname$directory$git_branch$git_state$git_status$nix_shell$cmd_duration$line_break$python$character";
palette = {
os = "#ACB0BE"; directory = {
pink = "#F5BDE6"; style = "blue";
lavender = "#B7BDF8"; };
blue = "#8AADF4";
white = "#FFFFFF"; character = {
text = "#494D64"; success_symbol = "[](white)";
}; error_symbol = "[](red)";
blocks = [ vimcmd_symbol = "[](green)";
{ };
alignment = "left";
newline = true; git_branch = {
segments = [ format = "[$branch]($style)";
{ style = "green";
background = "p:blue"; };
foreground = "p:white";
powerline_symbol = builtins.fromJSON '' "\ue0b4" ''; git_status = {
leading_diamond = builtins.fromJSON '' "\ue0b6" ''; format = "[[($conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)";
style = "diamond"; style = "cyan";
template = "{{.Icon}} "; conflicted = "!";
type = "os"; untracked = "u";
} modified = "*";
{ staged = "+";
background = "p:blue"; renamed = "r";
foreground = "p:text"; deleted = "d";
powerline_symbol = builtins.fromJSON '' "\ue0b4" ''; stashed = "";
style = "diamond"; };
template = "{{ .UserName }}@{{ .HostName }}";
type = "session"; git_state = {
} format = "\([$state( $progress_current/$progress_total)]($style)\) ";
{ style = "bright-black";
background = "p:pink"; };
foreground = "p:text";
properties = { cmd_duration = {
folder_icon = "..\ue5fe.."; format = "[$duration]($style) ";
home_icon = "~"; style = "yellow";
style = "folder"; };
};
powerline_symbol = builtins.fromJSON '' "\ue0b4" ''; python = {
style = "powerline"; format = "[$virtualenv]($style) ";
template = builtins.fromJSON '' " \udb81\udf70 {{ .Path }}" ''; style = "bright-black";
type = "path";
}
{
background = "p:blue";
foreground = "p:text";
powerline_symbol = builtins.fromJSON '' "\ue0b4" '';
template = builtins.fromJSON '' "{{if .Env.IN_NIX_SHELL}} \uf313 in nix-shell{{else}}{{end}}" '';
style = "diamond";
type = "text";
}
{
background = "p:lavender";
foreground = "p:text";
style = "powerline";
properties = {
branch_icon = builtins.fromJSON '' "\ue725 " '';
cherry_pick_icon = builtins.fromJSON '' "\ue29b " '';
commit_icon = builtins.fromJSON '' "\uf417 " '';
fetch_status = true;
fetch_upstream_icon = true;
fetch_bare_info = true;
merge_icon = builtins.fromJSON '' "\ue727 " '';
no_commits_icon = builtins.fromJSON '' "\uf0c3 " '';
rebase_icon = builtins.fromJSON '' "\ue728 " '';
revert_icon = builtins.fromJSON '' "\uf0e2 " '';
tag_icon = builtins.fromJSON '' "\uf412 " '';
};
powerline_symbol = builtins.fromJSON '' "\ue0b4" '';
template = " {{ .HEAD }}{{ .Working }}";
type = "git";
}
{
background = "#f38ba8";
foreground = "p:text";
powerline_symbol = builtins.fromJSON '' "\ue0b4" '';
template = builtins.fromJSON '' "{{if eq .Code 0}}{{else}} \uea87 {{.Code}}<#f38ba8,transparent>\ue0b4{{end}}" '';
type = "status";
style = "diamond";
}
];
type = "prompt";
}
];
final_space = true;
version = 2;
}; };
}; };
};
} }