Battery : Replace cap info with all the info.
This commit is contained in:
parent
3c2b2d9f46
commit
3445c1d000
|
@ -4,9 +4,9 @@ function battery_charge() {
|
|||
echo '%'
|
||||
}
|
||||
|
||||
# Get battery's remaining max capacity in percents.
|
||||
function battery_capacity() {
|
||||
# Get battery's info.
|
||||
function battery_info() {
|
||||
local IFS=$'\n'
|
||||
local battery=("$(upower --enumerate | grep battery_BAT)")
|
||||
upower -i "${battery[0]}" | grep capacity | cut -d\ -f17
|
||||
upower -i "${battery[0]}"
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ Command|Description
|
|||
Command|Description
|
||||
---|---
|
||||
`battery_charge`| Print current battery charge in percents.
|
||||
`battery_capacity`| Get battery's remaining max capacity in percents.
|
||||
`battery_info`| Get battery's info.
|
||||
|
||||
## Bootstrap.
|
||||
|
||||
|
|
Reference in a new issue