From f0b582af3f34b9f18c331bb3666b1e8ce724d88e Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Thu, 6 Aug 2020 14:38:10 +0300 Subject: [PATCH] Swap information --- bin/bin/xstatusbar.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/bin/xstatusbar.sh b/bin/bin/xstatusbar.sh index dc5c66c..f2baf51 100755 --- a/bin/bin/xstatusbar.sh +++ b/bin/bin/xstatusbar.sh @@ -6,6 +6,7 @@ while :; do topinfo=$(top -b -d 1 0 | sed s/[,:]//g) meminfo=$(echo "$topinfo" | grep "^Mem") arcinfo=$(echo "$topinfo" | grep "^ARC") - xsetroot -name "$meminfo | $arcinfo | $fdm_state $life% $(date "+%Y-%m-%dT%H:%M:%S")" + swpinfo=$(echo "$topinfo" | perl -ne 'print $1 if /^Swap \w+ Total (\w+) Used/') + xsetroot -name "$swpinfo $meminfo $arcinfo $fdm_state $life% $(date "+%Y-%m-%dT%H:%M:%S")" sleep 20 done -- 2.44.0