This commit is contained in:
2026-07-12 15:25:55 -03:00
commit 29377d0c9a
160 changed files with 6138 additions and 0 deletions
@@ -0,0 +1,23 @@
{
inputs,
lib,
config,
pkgs,
...
}:
{
options.custom = {
oh-my-posh.enable = lib.mkEnableOption "enable oh-my-posh prompt decorator";
};
config = lib.mkIf config.custom.oh-my-posh.enable {
programs.oh-my-posh = {
enable = true;
enableZshIntegration = true;
settings = builtins.fromJSON (builtins.readFile ./oh-my-posh.omp.json);
};
};
}
@@ -0,0 +1,87 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"transient_prompt": {
"template": "> "
},
"blocks": [
{
"alignment": "left",
"segments": [
{
"foreground": "#ffbb93",
"style": "plain",
"template": "{{ .UserName }}'s ",
"type": "session"
},
{
"foreground": "#a75d31",
"options": {
"style": "folder"
},
"style": "plain",
"template": "{{ .Path }}/ ",
"type": "path"
},
{
"foreground": "#f3e1da",
"options": {
"fetch_status": true
},
"style": "plain",
"template": "<#ffffff>on</> {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ",
"type": "git"
},
{
"foreground": "#ecc3b0",
"options": {
"fetch_version": true
},
"style": "plain",
"template": "<#ffffff>via</> \ue781 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} ",
"type": "node"
}
],
"type": "prompt"
},
{
"alignment": "right",
"segments": [
{
"foreground": "#d5d096",
"style": "diamond",
"template": "RAM:{{ (div ((sub .PhysicalTotalMemory .PhysicalAvailableMemory)|float64) 1073741824.0) }}/{{ (div .PhysicalTotalMemory 1073741824.0) }}GB ",
"trailing_diamond": " ",
"type": "sysinfo"
},
{
"foreground": "#ffffff",
"leading_diamond": "\u250b",
"options": {
"style": "roundrock",
"threshold": 0
},
"style": "diamond",
"template": " {{ .FormattedMs }} ",
"type": "executiontime"
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#ffbb93",
"style": "plain",
"template": " ",
"type": "text",
"foreground_templates": ["{{ if gt .Code 0 }}#ffb8af{{ end }}"]
}
],
"type": "prompt"
}
],
"final_space": true,
"version": 4
}