From bb1cdfface330c6585fa694254397c8b58351dd5 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 26 Jun 2023 10:25:46 +0100 Subject: (Scripts>status)+Emacs memory to status script --- Scripts/.local/scripts/status/memory | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Scripts/.local/scripts') diff --git a/Scripts/.local/scripts/status/memory b/Scripts/.local/scripts/status/memory index ecdfc0e..8ae6baf 100755 --- a/Scripts/.local/scripts/status/memory +++ b/Scripts/.local/scripts/status/memory @@ -4,4 +4,5 @@ line=$(free -m | sed -n 2p); used=$(echo $line | awk '{print $3}'); available=$(echo $line | awk '{print $2}'); value=$(echo "100 * $used / $available" | bc -l | xargs printf "%.2f" $1) -echo " $(printf "%dMB" $used) $value%" +emacs=$(systemctl --user status emacs | grep "Memory: " | sed "s/[ ]*//;s/Memory: //") +echo " $(printf "%dMB" $used) $value% ->  $emacs" -- cgit v1.2.3-13-gbd6f