diff --git a/plugins/battery/battery.plugin.sh b/plugins/battery/battery.plugin.sh index 914a899..47c7621 100644 --- a/plugins/battery/battery.plugin.sh +++ b/plugins/battery/battery.plugin.sh @@ -61,7 +61,7 @@ battery_percentage(){ if command_exists upower; then - local UPOWER_OUTPUT=$(_omb_plugin_battery__upower_print_info | grep percentage | tail --bytes 5) + local UPOWER_OUTPUT=$(_omb_plugin_battery__upower_print_info | sed -n 's/.*percentage[:[:blank:]]*\([0-9%]\{1,\}\)$/\1/p') echo ${UPOWER_OUTPUT: : -1} elif command_exists acpi; then