9 lines
175 B
Bash
9 lines
175 B
Bash
|
|
#!/bin/bash
|
||
|
|
|
||
|
|
# archypr:summary=Returns the battery percentage remaining as an integer.
|
||
|
|
|
||
|
|
upower -i $(upower -e | grep BAT) | awk '/percentage/ {
|
||
|
|
print int($2)
|
||
|
|
exit
|
||
|
|
}'
|