Make NetBSD use the linux memory function
This commit is contained in:
parent
33bb8ff4d3
commit
239cede221
1 changed files with 7 additions and 0 deletions
7
neofetch
7
neofetch
|
@ -1386,6 +1386,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
|
||||||
|
|
Loading…
Reference in a new issue