dots/.bin/check-battery-level

6 lines
111 B
Bash
Executable File

#!/usr/bin/env bash
capacityStatus="$(cat /sys/class/power_supply/BAT0/capacity)"
printf "$capacityStatus%%"