This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/os/linux/bin/batteries-watts

5 lines
118 B
Fish
Executable file

#!/usr/bin/env fish
for b in /sys/class/power_supply/BAT*/power_now
cat $b | rg . | awk '{print $1*10^-6 " W"}'
end