From fd8994b938ed018b1772e90619795a5f43db458f Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 5 Nov 2016 08:51:59 +1100 Subject: [PATCH] Haiku: Fix battery usage --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 9fb21ea6..2bde2815 100755 --- a/neofetch +++ b/neofetch @@ -1738,8 +1738,8 @@ getbattery() { ;; "Haiku") - battery0full="$(awk -F '[^0-9]*' 'NR==2 {print $4}' /dev/power/acpi_battery/0)" - battery0now="$(awk -F '[^0-9]*' 'NR==5 {print $4}' /dev/power/acpi_battery/0)" + battery0full="$(awk -F '[^0-9]*' 'NR==5 {print $4}' /dev/power/acpi_battery/0)" + battery0now="$(awk -F '[^0-9]*' 'NR==2 {print $4}' /dev/power/acpi_battery/0)" battery="$((battery0full / battery0now * 100))%" ;; esac