From cdb576479e0f561075737061c07be0af6607d6cb Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 30 Apr 2018 16:18:24 +1000 Subject: [PATCH] macOS: Fix memory bug. --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index 7c7ad804..f793a1e7 100755 --- a/neofetch +++ b/neofetch @@ -1463,6 +1463,7 @@ get_memory() { mem_wired="$(vm_stat | awk '/wired/ { print $4 }')" mem_active="$(vm_stat | awk '/active / { printf $3 }')" mem_compressed="$(vm_stat | awk '/occupied/ { printf $5 }')" + mem_compressed="${mem_compressed:-0}" mem_used="$(((${mem_wired//.} + ${mem_active//.} + ${mem_compressed//.}) * 4 / 1024))" ;;