mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-09 20:44:03 -08:00
fix: correct theme memory display template for byte-to-gigabyte conversion
Updated conversion factor from 1000000000 to 1073741824. This change ensures memory usage is correctly displayed as a gigabyte (2^30 bytes).
This commit is contained in:
parent
db32446a74
commit
e976ce89c1
|
@ -69,7 +69,7 @@
|
|||
{
|
||||
"foreground": "#94ffa2",
|
||||
"style": "diamond",
|
||||
"template": " <#ffffff>MEM:</> {{ round .PhysicalPercentUsed .Precision }}% ({{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1000000000.0) }}/{{ (div .PhysicalTotalMemory 1000000000.0) }}GB)",
|
||||
"template": " <#ffffff>MEM:</> {{ round .PhysicalPercentUsed .Precision }}% ({{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1073741824.0) }}/{{ (div .PhysicalTotalMemory 1073741824.0) }}GB)",
|
||||
"type": "sysinfo"
|
||||
}
|
||||
],
|
||||
|
@ -95,9 +95,7 @@
|
|||
},
|
||||
{
|
||||
"foreground": "#A9FFB4",
|
||||
"foreground_templates": [
|
||||
"{{ if gt .Code 0 }}#ef5350{{ end }}"
|
||||
],
|
||||
"foreground_templates": ["{{ if gt .Code 0 }}#ef5350{{ end }}"],
|
||||
"properties": {
|
||||
"always_enabled": true
|
||||
},
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
{
|
||||
"foreground": "#85C980",
|
||||
"style": "diamond",
|
||||
"template": "RAM:{{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1000000000.0) }}/{{ (div .PhysicalTotalMemory 1000000000.0) }}GB ",
|
||||
"template": "RAM:{{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1073741824.0) }}/{{ (div .PhysicalTotalMemory 1073741824.0) }}GB ",
|
||||
"trailing_diamond": " ",
|
||||
"type": "sysinfo"
|
||||
},
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
{
|
||||
"foreground": "#81ff91",
|
||||
"style": "diamond",
|
||||
"template": "<#cc7eda> \u007C </><#7eb8da>RAM:</> {{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1000000000.0) }}/{{ (div .PhysicalTotalMemory 1000000000.0) }}GB",
|
||||
"template": "<#cc7eda> \u007C </><#7eb8da>RAM:</> {{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1073741824.0) }}/{{ (div .PhysicalTotalMemory 1073741824.0) }}GB",
|
||||
"type": "sysinfo"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
"background": "#00c7fc",
|
||||
"foreground": "#000000",
|
||||
"style": "diamond",
|
||||
"template": "RAM: {{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1000000000.0) }}/{{ (div .PhysicalTotalMemory 1000000000.0) }}GB \ue266 ",
|
||||
"template": "RAM: {{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1073741824.0) }}/{{ (div .PhysicalTotalMemory 1073741824.0) }}GB \ue266 ",
|
||||
"trailing_diamond": "<transparent,#00c7fc>\ue0b2</>",
|
||||
"type": "sysinfo"
|
||||
},
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
{
|
||||
"foreground": "#ff8800",
|
||||
"style": "diamond",
|
||||
"template": "{{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1000000000.0) }}/{{ (div .PhysicalTotalMemory 1000000000.0) }}GB ",
|
||||
"template": "{{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1073741824.0) }}/{{ (div .PhysicalTotalMemory 1073741824.0) }}GB ",
|
||||
"type": "sysinfo"
|
||||
}
|
||||
],
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
{
|
||||
"foreground": "#be9ddf",
|
||||
"style": "diamond",
|
||||
"template": "[<#ffffff>\ue266</> RAM: {{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1000000000.0) }}/{{ (div .PhysicalTotalMemory 1000000000.0) }}GB]",
|
||||
"template": "[<#ffffff>\ue266</> RAM: {{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1073741824.0) }}/{{ (div .PhysicalTotalMemory 1073741824.0) }}GB]",
|
||||
"type": "sysinfo"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
"background": "#516BEB",
|
||||
"foreground": "#ffffff",
|
||||
"style": "diamond",
|
||||
"template": "RAM: {{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1000000000.0) }}/{{ (div .PhysicalTotalMemory 1068786176.0) }}GB \ue266 ",
|
||||
"template": "RAM: {{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1073741824.0) }}/{{ (div .PhysicalTotalMemory 1073741824.0) }}GB \ue266 ",
|
||||
"trailing_diamond": "<transparent,#516BEB>\ue0b2</>",
|
||||
"type": "sysinfo"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue