From: Sergey Matveev Date: Thu, 6 Aug 2020 11:38:10 +0000 (+0300) Subject: Swap information X-Git-Url: http://www.git.stargrave.org/?p=dotfiles.git;a=commitdiff_plain;h=f0b582af3f34b9f18c331bb3666b1e8ce724d88e Swap information --- 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