oh-my-posh/themes/di4am0nd.omp.json
Eduard Tolosa d6c1ff9518 fix: use .PhysicalAvailableMemory instead of PhysicalFreeMemory
when showing memory usage, what you want to know is the used memory,
which doesn't include cached memory; cache memory can be claimed by
the kernel under memory pressure.

the Linux kernel will try to use as much cache as possible by default,
but that doesn't mean that the RAM is not available.

This PR fixes that and shows only the real used memory.
2025-03-03 13:59:11 +01:00

84 lines
2.3 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"foreground": "#FFBD00",
"style": "plain",
"template": "{{ .UserName }}'s ",
"type": "session"
},
{
"foreground": "#00C6F7",
"properties": {
"style": "folder"
},
"style": "plain",
"template": "{{ .Path }}/ ",
"type": "path"
},
{
"foreground": "#F62F2E",
"properties": {
"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": "#98C379",
"properties": {
"fetch_version": true
},
"style": "plain",
"template": "<#ffffff>via</> \ue781 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} ",
"type": "node"
}
],
"type": "prompt"
},
{
"alignment": "right",
"segments": [
{
"foreground": "#85C980",
"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",
"properties": {
"style": "roundrock",
"threshold": 0
},
"style": "diamond",
"template": " {{ .FormattedMs }} ",
"type": "executiontime"
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#FFBD00",
"style": "plain",
"template": "\u2b9e ",
"type": "text"
}
],
"type": "prompt"
}
],
"final_space": true,
"version": 3
}