Files
dotfiles/.config/fish/functions/battery_capacity.fish
2025-09-02 03:32:47 +02:00

12 lines
330 B
Fish

function battery_capacity
cd /sys/class/power_supply/
for dir in ( ls | rg BAT | cut -d" " -f1)
cd $dir &&
cat energy_full | read x &&
cat energy_full_design | read y &&
echo "capacity % of $dir compared to design capacity"
kalker $x/$y &&
cd ..
end
end