lain/bat.md

23 lines
969 B
Markdown
Raw Normal View History

2013-09-07 14:35:22 +02:00
[<- widgets](https://github.com/copycat-killer/lain/wiki/Widgets)
2013-09-07 14:13:26 +02:00
Shows in a textbox the remaining time and percentage capacity of your laptop battery, as well as
2013-09-07 12:34:00 +02:00
the current wattage.
Displays a notification when battery is low or critical.
mybattery = lain.widgets.bat()
The function takes a table as optional argument, which can contain:
Variable | Meaning | Type | Default
--- | --- | --- | ---
`battery` | Identifier of the battery | string | "BAT0"
`show_all` | Show all values (true), or only remaining capacity (false) | boolean | false
`refresh_timeout` | Refresh timeout seconds | int | 30
2013-09-08 18:51:36 +02:00
`header` | Text to show before value | string | " Bat "
2013-09-07 12:34:00 +02:00
`header_color` | Header color | string | `beautiful.fg_normal` or "#FFFFFF"
`color` | Value color | string | `beautiful.fg_focus` or "#FFFFFF"
2013-09-09 13:58:26 +02:00
`footer` | Text to append after value | string | " "
2013-09-09 13:59:05 +02:00
`shadow` | Hide the widget when battery is not present | boolean | false
**Note**: `footer` can be markup text.