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";
text = "#494D64";
}; };
blocks = [
{ character = {
alignment = "left"; success_symbol = "[](white)";
newline = true; error_symbol = "[](red)";
segments = [ vimcmd_symbol = "[](green)";
{
background = "p:blue";
foreground = "p:white";
powerline_symbol = builtins.fromJSON '' "\ue0b4" '';
leading_diamond = builtins.fromJSON '' "\ue0b6" '';
style = "diamond";
template = "{{.Icon}} ";
type = "os";
}
{
background = "p:blue";
foreground = "p:text";
powerline_symbol = builtins.fromJSON '' "\ue0b4" '';
style = "diamond";
template = "{{ .UserName }}@{{ .HostName }}";
type = "session";
}
{
background = "p:pink";
foreground = "p:text";
properties = {
folder_icon = "..\ue5fe..";
home_icon = "~";
style = "folder";
}; };
powerline_symbol = builtins.fromJSON '' "\ue0b4" '';
style = "powerline"; git_branch = {
template = builtins.fromJSON '' " \udb81\udf70 {{ .Path }}" ''; format = "[$branch]($style)";
type = "path"; style = "green";
} };
{
background = "p:blue"; git_status = {
foreground = "p:text"; format = "[[($conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)";
powerline_symbol = builtins.fromJSON '' "\ue0b4" ''; style = "cyan";
template = builtins.fromJSON '' "{{if .Env.IN_NIX_SHELL}} \uf313 in nix-shell{{else}}{{end}}" ''; conflicted = "!";
style = "diamond"; untracked = "u";
type = "text"; modified = "*";
} staged = "+";
{ renamed = "r";
background = "p:lavender"; deleted = "d";
foreground = "p:text"; stashed = "";
style = "powerline"; };
properties = {
branch_icon = builtins.fromJSON '' "\ue725 " ''; git_state = {
cherry_pick_icon = builtins.fromJSON '' "\ue29b " ''; format = "\([$state( $progress_current/$progress_total)]($style)\) ";
commit_icon = builtins.fromJSON '' "\uf417 " ''; style = "bright-black";
fetch_status = true; };
fetch_upstream_icon = true;
fetch_bare_info = true; cmd_duration = {
merge_icon = builtins.fromJSON '' "\ue727 " ''; format = "[$duration]($style) ";
no_commits_icon = builtins.fromJSON '' "\uf0c3 " ''; style = "yellow";
rebase_icon = builtins.fromJSON '' "\ue728 " ''; };
revert_icon = builtins.fromJSON '' "\uf0e2 " '';
tag_icon = builtins.fromJSON '' "\uf412 " ''; python = {
format = "[$virtualenv]($style) ";
style = "bright-black";
}; };
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;
}; };
}; };
} }