aboutsummaryrefslogtreecommitdiff
path: root/Scripts/.local/scripts/status/battery
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2024-08-19 16:29:37 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2024-08-19 16:29:37 +0100
commitd56aea2398fee968b8b466482da859f5b795c43b (patch)
tree103d946a1e09edc202d65521f9a8a6842913ffcf /Scripts/.local/scripts/status/battery
parent927a4f96b30da9ad5c6b178d840fa1acecf72024 (diff)
downloaddotfiles-d56aea2398fee968b8b466482da859f5b795c43b.tar.gz
dotfiles-d56aea2398fee968b8b466482da859f5b795c43b.tar.bz2
dotfiles-d56aea2398fee968b8b466482da859f5b795c43b.zip
(Scripts)+script for getting time left in battery using acpi -b
Customisable and has an exact hour + minute timer.
Diffstat (limited to 'Scripts/.local/scripts/status/battery')
-rwxr-xr-xScripts/.local/scripts/status/battery2
1 files changed, 1 insertions, 1 deletions
diff --git a/Scripts/.local/scripts/status/battery b/Scripts/.local/scripts/status/battery
index 6cf5b52..f89d123 100755
--- a/Scripts/.local/scripts/status/battery
+++ b/Scripts/.local/scripts/status/battery
@@ -1,7 +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" | sed 's/.*://' | xargs echo $1)
+time_left=$($HOME/.local/scripts/status/battery_time_left);
if [[ $status == "Charging" ]]
then