mirror of
https://github.com/lptstr/winfetch.git
synced 2026-09-28 01:46:03 -04:00
Change memory style
This commit is contained in:
@@ -337,9 +337,9 @@ $strings.gpu = if ($configuration.HasFlag([Configuration]::Show_GPU)) {
|
||||
# ===== MEMORY =====
|
||||
$strings.memory = if ($configuration.HasFlag([Configuration]::Show_Memory)) {
|
||||
$m = Get-CimInstance -ClassName Win32_OperatingSystem -Property TotalVisibleMemorySize,FreePhysicalMemory -CimSession $cimSession
|
||||
$total = [math]::floor(($m.TotalVisibleMemorySize / 1mb))
|
||||
$used = [math]::floor((($m.FreePhysicalMemory - $total) / 1mb))
|
||||
("{0}GiB / {1}GiB" -f $used,$total)
|
||||
$total = $m.TotalVisibleMemorySize / 1mb
|
||||
$used = ($m.TotalVisibleMemorySize - $m.FreePhysicalMemory) / 1mb
|
||||
("{0:f1} GiB / {1:f1} GiB" -f $used,$total)
|
||||
} else {
|
||||
$disabled
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user