Add 2 dummy numbers to mem function

This commit is contained in:
Dylan 2016-03-28 09:47:38 +11:00
parent e2ae78c898
commit f358f25e8a

View file

@ -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))