X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=bin%2Fbin%2Fxstatusbar.sh;h=35bd1e66c22eef6b115e72f10150411a787cab0e;hb=4cf03c348b7f1982c892834b04cfe3cf7ab2895c;hp=dc5c66c71954929f1ac5f5877c8eaf039d11171f;hpb=17bcc246a3515b838a7cd61bb9b0b745ef0f67bd;p=dotfiles.git diff --git a/bin/bin/xstatusbar.sh b/bin/bin/xstatusbar.sh index dc5c66c..35bd1e6 100755 --- a/bin/bin/xstatusbar.sh +++ b/bin/bin/xstatusbar.sh @@ -1,11 +1,11 @@ #!/bin/sh while :; do - life=$(apm -l) - [ -e /tmp/do-fdm ] && fdm_state="FM" || fdm_state="" + flags="$(ls /tmp/stargrave-flags | perl -e 'print join " ", sort map { chomp and $_ } <>')" 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 [$flags] $(date "+%Y-%m-%dT%H:%M:%S")" sleep 20 done