1
1
Fork 0

zshrc: Add power_now function

This commit is contained in:
Jonathan Schleifer 2021-09-23 22:19:50 +00:00
parent 3ee2074bd8
commit 7dcb416f6d

7
zshrc
View file

@ -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]' \