From 04685755c144878a6716133bcb5eb98ae47caa6c Mon Sep 17 00:00:00 2001 From: coypoop Date: Sun, 16 Oct 2016 09:01:16 +0300 Subject: [PATCH] physmem is 32bit on netbsd, physmem64 for 64bit --- neofetch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 8042974b..abd4905a 100755 --- a/neofetch +++ b/neofetch @@ -1172,7 +1172,10 @@ getmemory() { *) memfree="$(($(vmstat | awk 'END{printf $5}') / 1024))" ;; esac - memtotal="$(($(sysctl -n hw.physmem) / 1024 / 1024))" + case "$distro" in + "NetBSD"*) memtotal="$(($(sysctl -n hw.physmem64) / 1024 / 1024))" ;; + *) memtotal="$(($(sysctl -n hw.physmem) / 1024 / 1024))" ;; + esac memused="$((memtotal - memfree))" ;;