dots-of-war/eggs/scripts/battery_indicator.sh

9 lines
223 B
Bash
Raw Normal View History

2024-12-05 21:10:22 +00:00
#!/usr/bin/env bash
#output="$(upower -i /org/freedesktop/UPower/devices/battery_BAT1)"
percentage="$(cat /sys/class/power_supply/BAT1/capacity)"
status="$(cat /sys/class/power_supply/BAT1/status)"
echo "${percentage}%"