]> Sergey Matveev's repositories - dotfiles.git/commitdiff
No laptop -> no battery
authorSergey Matveev <stargrave@stargrave.org>
Sun, 22 Aug 2021 17:05:11 +0000 (20:05 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sun, 22 Aug 2021 17:05:11 +0000 (20:05 +0300)
bin/bin/xstatusbar.sh

index 17a1b7712ae3c04f876e459651fac6b23c01b5e1..35bd1e66c22eef6b115e72f10150411a787cab0e 100755 (executable)
@@ -1,12 +1,11 @@
 #!/bin/sh
 
 while :; do
 #!/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/')
     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
     sleep 20
 done