README
This commit is contained in:
parent
8ebca17e79
commit
e0f938bcac
15
README.md
15
README.md
@ -87,9 +87,24 @@ Available formatters:
|
||||
This class uses the /sys/class/power_supply/…/uevent interface to check for the
|
||||
battery status
|
||||
|
||||
Available formatters for format and alert_format_\*:
|
||||
|
||||
* remaining_str
|
||||
* remaining_hm
|
||||
* percentage
|
||||
* percentage_design
|
||||
* consumption (Watts)
|
||||
* status
|
||||
* battery_ident
|
||||
|
||||
|
||||
* `battery_ident` — (default: `BAT0`)
|
||||
* `format` — (default: `{status} {remaining}`)
|
||||
* `alert` — Display a libnotify-notification on low battery (default: `False`)
|
||||
* `alert_percentage` — (default: `10`)
|
||||
* `alert_format_title` — (default: `Low battery`)
|
||||
* `alert_format_body` — (default: `Battery {battery_ident} has only {percentage:.2f}% ({remaining_hm}) remaining!`)
|
||||
* `alert_percentage` — (default: `10`)
|
||||
|
||||
|
||||
|
||||
|
@ -71,7 +71,7 @@ class BatteryChecker(IntervalModule):
|
||||
alert = False
|
||||
alert_percentage = 10
|
||||
alert_format_title = "Low battery"
|
||||
alert_format_body = "Battery {battery_ident} has only {percentage} % ({remaining_hm}) remaining!"
|
||||
alert_format_body = "Battery {battery_ident} has only {percentage:.2f}% ({remaining_hm}) remaining!"
|
||||
|
||||
def init(self):
|
||||
self.base_path = "/sys/class/power_supply/{0}/uevent".format(self.battery_ident)
|
||||
|
Loading…
Reference in New Issue
Block a user