Battery : Replace cap info with all the info.

This commit is contained in:
Dmitry Voronin 2024-02-15 01:42:14 +03:00
parent 3c2b2d9f46
commit 3445c1d000
2 changed files with 4 additions and 4 deletions

View file

@ -4,9 +4,9 @@ function battery_charge() {
echo '%' echo '%'
} }
# Get battery's remaining max capacity in percents. # Get battery's info.
function battery_capacity() { function battery_info() {
local IFS=$'\n' local IFS=$'\n'
local battery=("$(upower --enumerate | grep battery_BAT)") local battery=("$(upower --enumerate | grep battery_BAT)")
upower -i "${battery[0]}" | grep capacity | cut -d\ -f17 upower -i "${battery[0]}"
} }

View file

@ -35,7 +35,7 @@ Command|Description
Command|Description Command|Description
---|--- ---|---
`battery_charge`| Print current battery charge in percents. `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. ## Bootstrap.