diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2021-07-10 17:11:33 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2021-07-10 17:11:33 +0100 |
commit | c6163358090bc5c4123f634f3bdd91c987c78aa4 (patch) | |
tree | e16307bd396db687e18803c02db32937b159f96b /Scripts/.local/scripts/status/battery | |
parent | be603ca4a273d60992130c658a182380a7984f7c (diff) | |
download | dotfiles-c6163358090bc5c4123f634f3bdd91c987c78aa4.tar.gz dotfiles-c6163358090bc5c4123f634f3bdd91c987c78aa4.tar.bz2 dotfiles-c6163358090bc5c4123f634f3bdd91c987c78aa4.zip |
(Scripts/status)~few minor edits for functionality and cleanliness
Status scripts needed some updating for dwmblocks, so did it.
Diffstat (limited to 'Scripts/.local/scripts/status/battery')
-rwxr-xr-x | Scripts/.local/scripts/status/battery | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Scripts/.local/scripts/status/battery b/Scripts/.local/scripts/status/battery index c3e40f0..2a17301 100755 --- a/Scripts/.local/scripts/status/battery +++ b/Scripts/.local/scripts/status/battery @@ -1,6 +1,7 @@ #!/usr/bin/env bash capacity=$(cat /sys/class/power_supply/BAT0/capacity) || break status=$(cat /sys/class/power_supply/BAT0/status) +time_left=$(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep "time to empty" | sed 's/.*://' | xargs echo $1) if [[ $status == "Charging" ]] then @@ -22,4 +23,4 @@ else status="" fi fi -echo "$status $capacity%" +echo "$status $capacity% $time_left" |