diff --git a/zshrc b/zshrc index 154887b..15c1a7a 100644 --- a/zshrc +++ b/zshrc @@ -395,6 +395,13 @@ fi ixio() { curl -F 'f:1=<-' ix.io } 0x0st() { curl -F'file=@-' https://0x0.st } +if [ -f /sys/class/power_supply/BAT0/power_now ]; then + power_now() { + awk '{ print $1*10^-6 " W" }' \ + /sys/class/power_supply/BAT0/power_now + } +fi + cross() { if [ $# = 0 ]; then echo 'Usage: cross platform [architecture1] [architecture2]' \