From 5d63097994f6577b1cef6b1d192143df9a597032 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Wed, 5 Jul 2017 16:50:05 +0700 Subject: [PATCH] Memory [HP-UX]: Complete support --- neofetch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index 5ccd8d32..134dc60b 100755 --- a/neofetch +++ b/neofetch @@ -1359,10 +1359,10 @@ get_memory() { ;; "HP-UX") - # Partial support. Again, hppa and IA64 have a different - # command of how to access this. And they need root for - # some rason. + mem_total="$(machinfo | awk -F':' '/Memory/ {print $2}')" + mem_total="${mem_total/MB*}" mem_free="$(($(vmstat | awk 'NR==3{printf $5}') / 1024))" + mem_used="$((mem_total - mem_free))" ;; esac memory="${mem_used}${mem_label:-MiB} / ${mem_total}${mem_label:-MiB}"