Add 2 dummy numbers to mem function
This commit is contained in:
parent
e2ae78c898
commit
f358f25e8a
3
neofetch
3
neofetch
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
set -x
|
||||
# vim: fdm=marker:noai:ts=4:sw=4
|
||||
#
|
||||
# Neofetch info about your system
|
||||
|
@ -1091,7 +1090,7 @@ getgpu () {
|
|||
getmemory () {
|
||||
case "$os" in
|
||||
"Linux" | "Windows")
|
||||
mem=($(awk -F ':| kB' '/MemTotal|MemFree|Buffers|Cached/ {printf $2}' /proc/meminfo ))
|
||||
mem=($(awk -F ':| kB' '/MemTotal|MemFree|Buffers|Cached/ {printf $2}' /proc/meminfo ) 0 0)
|
||||
memused=$((${mem[0]} - ${mem[1]} - ${mem[2]} - ${mem[3]}))
|
||||
memused=$((memused / 1024))
|
||||
memtotal=$((${mem[0]} / 1024))
|
||||
|
|
Reference in New Issue