Merge branch 'master' of github.com:dylanaraps/neofetch

This commit is contained in:
Dylan 2016-03-28 09:52:50 +11:00
commit 82a085cd12

View file

@ -1089,8 +1089,8 @@ getgpu () {
getmemory () { getmemory () {
case "$os" in case "$os" in
"Linux") "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=$((${mem[0]} - ${mem[1]} - ${mem[2]} - ${mem[3]}))
memused=$((memused / 1024)) memused=$((memused / 1024))
memtotal=$((${mem[0]} / 1024)) memtotal=$((${mem[0]} / 1024))
@ -1130,17 +1130,6 @@ getmemory () {
esac esac
;; ;;
"Windows")
mem="$(awk 'NR < 3 {printf $2 " "}' /proc/meminfo)"
memtotal=${mem/ *}
memfree=${mem#* }
memavail=$((memtotal - memfree))
memused=$((memtotal - memavail))
memused=$((${memused%% *} / 1024))
memtotal=$((${memtotal%% *} / 1024))
;;
esac esac
memory="${memused}MB / ${memtotal}MB" memory="${memused}MB / ${memtotal}MB"
@ -2471,6 +2460,7 @@ bar() {
# }}} # }}}
# }}} # }}}