From e19539e5f6a70b2acb1b8a2cf979c80f4d63a91d Mon Sep 17 00:00:00 2001 From: Michael Nolan Date: Mon, 15 Jun 2020 03:09:06 -0400 Subject: Add support for batteries outputting Time to empty on linux (#378) * Add support for batteries outputting Time to empty on linux The battery in the pinebook pro does not output the remaining charge in Wh or mAh, so i3 cannot calculate the time remaining. However, it does directly output the number of minutes remaining on in POWER_SUPPLY_TIME_TO_EMPTY. This adds support for reading this field and converting it to seconds_remaining. * Add testcase for POWER_SUPPLY_TIME_TO_EMTY_NOW --- testcases/026-battery-time-to-empty/i3status.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 testcases/026-battery-time-to-empty/i3status.conf (limited to 'testcases/026-battery-time-to-empty/i3status.conf') diff --git a/testcases/026-battery-time-to-empty/i3status.conf b/testcases/026-battery-time-to-empty/i3status.conf new file mode 100644 index 0000000..038ca5e --- /dev/null +++ b/testcases/026-battery-time-to-empty/i3status.conf @@ -0,0 +1,10 @@ +general { + output_format = "none" +} + +order += "battery 0" + +battery 0 { + format = "%status %percentage %remaining" + path = "testcases/026-battery-time-to-empty/BAT0_uevent" +} -- cgit v1.2.3