mirror of
https://github.com/hykilpikonna/hyfetch.git
synced 2026-08-24 17:55:32 -05:00
fix memory being divided by 1024 too many times on Interix by neowofetch
This commit is contained in:
3
neofetch
3
neofetch
@@ -3798,12 +3798,11 @@ get_memory() {
|
||||
mem_total="$($(winpath2unix $WINDIR)/System32/wbem/WMIC.exe computersystem get TotalPhysicalMemory)"
|
||||
mem_total="${mem_total//[[:space:]]}"
|
||||
mem_total="${mem_total/TotalPhysicalMemory}"
|
||||
mem_total="$((mem_total / 1024 / 1024))"
|
||||
mem_total="$((mem_total / 1024))"
|
||||
|
||||
mem_free="$($(winpath2unix $WINDIR)/System32/wbem/WMIC.exe os get FreePhysicalMemory)"
|
||||
mem_free="${mem_free//[[:space:]]}"
|
||||
mem_free="${mem_free/FreePhysicalMemory}"
|
||||
mem_free="$((mem_free / 1024))"
|
||||
|
||||
mem_used="$((mem_total - mem_free))"
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user