init
This commit is contained in:
8
bin/st-power
Executable file
8
bin/st-power
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
POWER="$(pwrstat -status | grep "Load" | awk '{print $2}')W"
|
||||
CHARGE=$(pwrstat -status | grep "Battery Capacity" | awk '{print $3$4}')
|
||||
if [[ "$CHARGE" == "100%" ]]; then
|
||||
echo $POWER
|
||||
else
|
||||
echo "$CHARGE $POWER"
|
||||
fi
|
||||
Reference in New Issue
Block a user