Simplified acpi

pull/1080/head
Nils Winkler 2017-10-24 07:42:37 +02:00
parent 7602b1da32
commit a573b63da2
1 changed files with 1 additions and 2 deletions

View File

@ -59,8 +59,7 @@ battery_percentage(){
echo ${UPOWER_OUTPUT:--1} echo ${UPOWER_OUTPUT:--1}
elif _command_exists acpi; elif _command_exists acpi;
then then
local ACPI_OUTPUT=$(acpi -b) local PERC_OUTPUT=$(acpi -b | awk -F, '/,/{gsub(/ /, "", $0); gsub(/%/,"", $0); print $2}' )
local PERC_OUTPUT=$(echo $ACPI_OUTPUT | awk -F, '/,/{gsub(/ /, "", $0); gsub(/%/,"", $0); print $2}' )
echo ${PERC_OUTPUT:--1} echo ${PERC_OUTPUT:--1}
elif _command_exists pmset; elif _command_exists pmset;
then then