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 e0e3472488d8e429ba50a164b80204d847777db0
parent 51e6d5ce4eda79d8270855dcd55247fb3d39ed45
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Wed, 22 May 2019 11:40:33 +0200

Clean up battery status info when almost full

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

diff --git a/.local/bin/sysstatus b/.local/bin/sysstatus @@ -9,9 +9,10 @@ vol=$(pulsemixer --get-volume | cut -d' ' -f1) cputemp=$(sed 's/[0-9][0-9][0-9]$//' /sys/class/thermal/thermal_zone0/temp) cpuload=$(cut -d' ' -f1 /proc/loadavg) batstatus=$(sed 's/Charging/+/;s/Discharging/-/' \ - /sys/class/power_supply/${battery}/status) + /sys/class/power_supply/${battery}/status | sed 's/Unknown//') batlvl=$(cat /sys/class/power_supply/${battery}/capacity) -batremain=$(acpi -b | sed 1q | sed 's/.*\([0-9][0-9]*:[0-9][0-9]\):[0-9][0-9].*/\1/') +batremain=$(acpi -b | sed 1q |\ + sed -n 's/.*\([0-9][0-9]*:[0-9][0-9]\):[0-9][0-9].*/\1/') wlanssid=$(iwgetid -r $wlandev) wlanquality=$(echo \ "0$(grep $wlandev /proc/net/wireless | awk '{print $3}')/70 * 100" |\