omp experiments

This commit is contained in:
unexplrd
2025-03-11 17:56:23 +02:00
parent 847fba9be2
commit 1133eeca2f

View File

@ -14,14 +14,14 @@ in {
programs.oh-my-posh = {
enable = true;
settings = {
version = 2;
# version = 2;
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 = [
{
type = "prompt";
alignment = "left";
newline = true;
segments = [
{
type = "path";
@ -57,14 +57,35 @@ in {
fetch_status = true;
};
}
];
}
{
type = "rprompt";
overflow = "hidden";
newline = true;
segments = [
{
type = "session";
style = "diamond";
style = "plain";
foreground = "white";
background = "transparent";
leading_diamond = "";
trailing_diamond = "";
template = "{{ if .SSHSession }} 󰢹 {{ .UserName }}@{{ .HostName }}{{ end }}";
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";
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";
template = "";
template = ">";
}
];
}
];
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";
template = " ";
template = "> ";
};
secondary_prompt = {
foreground = "magenta";
foreground = "green";
background = "transparent";
template = " ";
template = ">> ";
};
};
};