From: Sergey Matveev Date: Sun, 22 Aug 2021 17:05:11 +0000 (+0300) Subject: No laptop -> no battery X-Git-Url: http://www.git.stargrave.org/?p=dotfiles.git;a=commitdiff_plain;h=c7a31b65bb51cab872b72bbfe1b772e28e7bfc80 No laptop -> no battery --- diff --git a/bin/bin/xstatusbar.sh b/bin/bin/xstatusbar.sh index 17a1b77..35bd1e6 100755 --- a/bin/bin/xstatusbar.sh +++ b/bin/bin/xstatusbar.sh @@ -1,12 +1,11 @@ #!/bin/sh while :; do - life=$(apm -l) 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") swpinfo=$(echo "$topinfo" | perl -ne 'print $1 if /^Swap \w+ Total (\w+) Used/') - xsetroot -name "$swpinfo $meminfo $arcinfo [$flags] $life% $(date "+%Y-%m-%dT%H:%M:%S")" + xsetroot -name "$swpinfo $meminfo $arcinfo [$flags] $(date "+%Y-%m-%dT%H:%M:%S")" sleep 20 done