From 2b3940adb91f6e29802b5495e3aa3bbcd0f08de1 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 3 Nov 2016 11:14:34 +1100 Subject: [PATCH] Memory: [OpenBSD] Fix OpenBSD memory usage - @Head-on-a-Stick (Closes #413) --- neofetch | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index cad7f2e0..c25c9a91 100755 --- a/neofetch +++ b/neofetch @@ -1073,7 +1073,11 @@ getmemory() { "NetBSD"*) memtotal="$(($(sysctl -n hw.physmem64) / 1024 / 1024))" ;; *) memtotal="$(($(sysctl -n hw.physmem) / 1024 / 1024))" ;; esac - memused="$((memtotal - memfree))" + + case "$distro" in + "OpenBSD"*) memused="$(($(vmstat | awk 'END {printf $4}') / 1024))" ;; + *) memused="$((memtotal - memfree))" ;; + esac ;; "Solaris")