aboutsummaryrefslogtreecommitdiff
path: root/Scripts
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2022-09-18 11:59:00 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2022-09-18 12:00:25 +0000
commitd26f484d466c2122b4fbc1a2aecfc9ce8e16ee11 (patch)
tree93040af36af3b0acf7c5016ef2bb29b004f9823d /Scripts
parentf3c26def386e9e4ed51187150059ee84cb1579af (diff)
downloaddotfiles-d26f484d466c2122b4fbc1a2aecfc9ce8e16ee11.tar.gz
dotfiles-d26f484d466c2122b4fbc1a2aecfc9ce8e16ee11.tar.bz2
dotfiles-d26f484d466c2122b4fbc1a2aecfc9ce8e16ee11.zip
(Scripts)~battery script now uses just grep time
This is incase it is charging.
Diffstat (limited to 'Scripts')
-rwxr-xr-xScripts/.local/scripts/status/battery4
1 files changed, 2 insertions, 2 deletions
diff --git a/Scripts/.local/scripts/status/battery b/Scripts/.local/scripts/status/battery
index 2a17301..6cf5b52 100755
--- a/Scripts/.local/scripts/status/battery
+++ b/Scripts/.local/scripts/status/battery
@@ -1,11 +1,11 @@
#!/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)
+time_left=$(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep "time" | sed 's/.*://' | xargs echo $1)
if [[ $status == "Charging" ]]
then
- status=""
+ status=""
else
if [[ $capacity -ge 75 ]]
then