From ea1ed4d2169343537ee29afb8a66a21674279056 Mon Sep 17 00:00:00 2001 From: Dylan Date: Fri, 13 May 2016 09:06:51 +1000 Subject: [PATCH] Fix memory output on NetBSD --- neofetch | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/neofetch b/neofetch index 4a095de3..71af7d4f 100755 --- a/neofetch +++ b/neofetch @@ -938,6 +938,9 @@ getwmtheme () { # CPU {{{ getcpu () { + # NetBSD emulates the linux /proc filesystem instead of using sysctl for hw + # information so we have to use this block below which temporarily sets the + # OS to 'Linux' for the duration of this function. case "$distro" in "NetBSD"*) local os="Linux" ;; esac @@ -1382,6 +1385,13 @@ getgpu () { # Memory {{{ getmemory () { + # NetBSD emulates the linux /proc filesystem instead of using sysctl for hw + # information so we have to use this block below which temporarily sets the + # OS to 'Linux' for the duration of this function. + case "$distro" in + "NetBSD"*) local os="Linux" ;; + esac + case "$os" in "Linux" | "Windows") if [ ! -z "$(grep -F "MemAvail" /proc/meminfo)" ]; then