Simplified acpi
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user