omp experiments
This commit is contained in:
@ -14,14 +14,14 @@ in {
|
|||||||
programs.oh-my-posh = {
|
programs.oh-my-posh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
version = 2;
|
# version = 2;
|
||||||
final_space = true;
|
final_space = true;
|
||||||
console_title_template = "{{ if .SSHSession }}[{{ .HostName }}] {{ end }}{{ .Shell }} in {{ .Folder }}";
|
shell_integration = true;
|
||||||
|
console_title_template = "{{if .SSHSession}}{{.HostName}} {{ end }}{{ .Shell }} in {{ .Folder }}";
|
||||||
blocks = [
|
blocks = [
|
||||||
{
|
{
|
||||||
type = "prompt";
|
type = "prompt";
|
||||||
alignment = "left";
|
alignment = "left";
|
||||||
newline = true;
|
|
||||||
segments = [
|
segments = [
|
||||||
{
|
{
|
||||||
type = "path";
|
type = "path";
|
||||||
@ -57,14 +57,35 @@ in {
|
|||||||
fetch_status = true;
|
fetch_status = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "rprompt";
|
||||||
|
overflow = "hidden";
|
||||||
|
newline = true;
|
||||||
|
segments = [
|
||||||
{
|
{
|
||||||
type = "session";
|
type = "session";
|
||||||
style = "diamond";
|
style = "plain";
|
||||||
foreground = "white";
|
foreground = "white";
|
||||||
background = "transparent";
|
background = "transparent";
|
||||||
leading_diamond = "";
|
template = "{{ if .SSHSession }} {{ .UserName }}@{{ .HostName }} {{ end }}";
|
||||||
trailing_diamond = "";
|
}
|
||||||
template = "{{ if .SSHSession }} {{ .UserName }}@{{ .HostName }}{{ end }}";
|
{
|
||||||
|
type = "connection";
|
||||||
|
template = "{{ if eq .Type \"wifi\"}} {{ else if eq .Type \"ethernet\"}} {{ else }} {{ end }}";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
style = "plain";
|
||||||
|
foreground = "white";
|
||||||
|
background = "transparent";
|
||||||
|
properties = {
|
||||||
|
charged_icon = "";
|
||||||
|
charging_icon = "";
|
||||||
|
discharging_icon = "";
|
||||||
|
};
|
||||||
|
template = "{{ if not .Error }} {{ .Icon }} {{ .Percentage }}% {{ end }}";
|
||||||
|
type = "battery";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -92,22 +113,22 @@ in {
|
|||||||
{
|
{
|
||||||
type = "text";
|
type = "text";
|
||||||
style = "plain";
|
style = "plain";
|
||||||
foreground_templates = ["{{if gt .Code 0}}red{{end}}" "{{if eq .Code 0}}magenta{{end}}"];
|
foreground_templates = ["{{if gt .Code 0}}red{{end}}" "{{if eq .Code 0}}green{{end}}"];
|
||||||
background = "transparent";
|
background = "transparent";
|
||||||
template = "❯";
|
template = ">";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
transient_prompt = {
|
transient_prompt = {
|
||||||
foreground_templates = ["{{if gt .Code 0}}red{{end}}" "{{if eq .Code 0}}magenta{{end}}"];
|
foreground_templates = ["{{if gt .Code 0}}red{{end}}" "{{if eq .Code 0}}green{{end}}"];
|
||||||
background = "transparent";
|
background = "transparent";
|
||||||
template = "❯ ";
|
template = "> ";
|
||||||
};
|
};
|
||||||
secondary_prompt = {
|
secondary_prompt = {
|
||||||
foreground = "magenta";
|
foreground = "green";
|
||||||
background = "transparent";
|
background = "transparent";
|
||||||
template = "❯❯ ";
|
template = ">> ";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user