Fix memory output on NetBSD
This commit is contained in:
parent
f48f5e92ab
commit
ea1ed4d216
10
neofetch
10
neofetch
|
@ -938,6 +938,9 @@ getwmtheme () {
|
||||||
# CPU {{{
|
# CPU {{{
|
||||||
|
|
||||||
getcpu () {
|
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
|
case "$distro" in
|
||||||
"NetBSD"*) local os="Linux" ;;
|
"NetBSD"*) local os="Linux" ;;
|
||||||
esac
|
esac
|
||||||
|
@ -1382,6 +1385,13 @@ getgpu () {
|
||||||
# Memory {{{
|
# Memory {{{
|
||||||
|
|
||||||
getmemory () {
|
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
|
case "$os" in
|
||||||
"Linux" | "Windows")
|
"Linux" | "Windows")
|
||||||
if [ ! -z "$(grep -F "MemAvail" /proc/meminfo)" ]; then
|
if [ ! -z "$(grep -F "MemAvail" /proc/meminfo)" ]; then
|
||||||
|
|
Reference in New Issue