11 lines
345 B
Bash
Executable File
11 lines
345 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
|
|
capacity=$(cat /sys/class/power_supply/BAT*/capacity)
|
|
status=$(cat /sys/class/power_supply/BAT*/status)
|
|
|
|
if [ "$status" != "Charging" ] && [ "$capacity" -lt 85 ]; then
|
|
echo " $capacity%"
|
|
else
|
|
echo ""
|
|
fi
|