From c7a31b65bb51cab872b72bbfe1b772e28e7bfc80 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sun, 22 Aug 2021 20:05:11 +0300 Subject: [PATCH] No laptop -> no battery --- bin/bin/xstatusbar.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 -- 2.44.0