From 3445c1d0002586161a37046abe3d9a214bf1996f Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Thu, 15 Feb 2024 01:42:14 +0300 Subject: [PATCH] Battery : Replace cap info with all the info. --- .config/bash/module/Battery.sh | 6 +++--- .doc/Bash.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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.