dots-of-war/scripts/scripts/battery_indicator.sh
2021-09-17 13:01:40 +02:00

10 lines
225 B
Bash
Executable file

#!/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}%"