diff --git a/.config/bash/module/Battery.sh b/.config/bash/module/Battery.sh index fc37bc5..8d1b799 100644 --- a/.config/bash/module/Battery.sh +++ b/.config/bash/module/Battery.sh @@ -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]}" } diff --git a/.doc/Bash.md b/.doc/Bash.md index d52e404..339d6eb 100644 --- a/.doc/Bash.md +++ b/.doc/Bash.md @@ -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.