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

6 lines
118 B
Plaintext
Raw Normal View History

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