diff options
author | Urbain Vaes <urbain@vaes.uk> | 2018-02-21 22:03:29 +0000 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2018-02-21 22:48:10 +0000 |
commit | a6e466a9947d8319dc1e5b1b7a9cf405c84166f1 (patch) | |
tree | 0cf1f6b8e7ee0aa3904a9e19786e59f551032892 /i3/.config/i3blocks/bin | |
parent | b9ea238dd7e8a56b1d171cdc76e405bb2a8584dd (diff) |
Clean vifm configuration
Diffstat (limited to 'i3/.config/i3blocks/bin')
-rwxr-xr-x | i3/.config/i3blocks/bin/battery | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/i3/.config/i3blocks/bin/battery b/i3/.config/i3blocks/bin/battery index b345f16..d475741 100755 --- a/i3/.config/i3blocks/bin/battery +++ b/i3/.config/i3blocks/bin/battery @@ -7,22 +7,10 @@ fi output="$(acpi -b)" remaining_time=$(echo "$output" | grep -o "[0-9][0-9]:[0-9][0-9]") -<<<<<<< HEAD - -if [ -d /sys/class/power_supply/BAT0 ]; then - now_charge=$(cat /sys/class/power_supply/BAT0/now_charge) - full_charge=$(cat /sys/class/power_supply/BAT0/full_charge) - charge=$(( (100*now_charge) / full_charge )) -else - echo "" - exit -fi -======= now_charge=$(cat /sys/class/power_supply/BAT0/now_charge) full_charge=$(cat /sys/class/power_supply/BAT0/full_charge) charge=$(( (100*now_charge) / full_charge )) # charge=$(echo "$output" | grep -oP "..(?=%)") ->>>>>>> de29d3a... Add minor updates if grep -q "Discharging" <(echo "$output"); then remaining_time=$(echo "$output" | grep -oP "..:..(?=:.. remaining)") |