From 239cede2215098c5a176fb6d24edbdb32d994361 Mon Sep 17 00:00:00 2001 From: Dylan Date: Fri, 13 May 2016 10:18:49 +1000 Subject: [PATCH] Make NetBSD use the linux memory function --- neofetch | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/neofetch b/neofetch index f4262e10..8f7d5fe2 100755 --- a/neofetch +++ b/neofetch @@ -1386,6 +1386,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