dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit bf90b4d94c7fdd2f8442438c6ac74b91bbc3a562
parent f57ad91750daa8ba4ecf90dd51fb400fc62644a9
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Wed, 26 Jun 2019 22:37:57 +0200

Fix battery remain time when it is more than 10 hours

Diffstat:
M.local/bin/sysstatus | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.local/bin/sysstatus b/.local/bin/sysstatus @@ -11,8 +11,9 @@ cpuload=$(cut -d' ' -f1 /proc/loadavg) batstatus=$(sed -n 's/Charging/+/;s/Discharging/-/' \ /sys/class/power_supply/${battery}/status | sed 's/Unknown//') batlvl=$(cat /sys/class/power_supply/${battery}/capacity) +acpi -b batremain=$(acpi -b | sed 1q |\ - sed -n 's/.*\([0-9][0-9]*:[0-9][0-9]\):[0-9][0-9].*$/\1/p') + sed -n 's/.*\([0-9][0-9]:[0-9][0-9]\):[0-9][0-9].*$/\1/p') battery="$(echo "${batstatus}${batlvl}% ${batremain}" | sed 's/ $//')" wlanssid=$(iwgetid -r $wlandev) wlanquality=$(echo \