awesome-wm-widgets/batteryarc-widget/README.md

61 lines
2.2 KiB
Markdown
Raw Normal View History

2017-10-05 02:46:09 +02:00
# Batteryarc widget
2017-10-09 23:14:03 +02:00
This widget is more informative version of [battery widget](https://github.com/streetturtle/awesome-wm-widgets/tree/master/battery-widget).
Depending of the battery status it could look following ways:
- ![10_d](./10_d.png) - less than 15 percent
- ![10_c](./10_c.png) - less than 15 percent, charging
- ![20_d](./20_d.png) - between 15 and 40 percent
- ![20_c](./20_c.png) - between 15 and 40 percent, charging
- ![80_d](./80_d.png) - more than 40 percent
- ![80_c](./80_c.png) - more than 40 percent, charging
If a battery level is low then warning popup will show up:
2017-10-09 23:14:03 +02:00
![warning](./warning.png)
## Customization
It is possible to customize widget by providing a table with all or some of the following config parameters:
| Name | Default | Description |
|---|---|---|
| `font` | Font | Play 6 |
2019-06-03 04:05:06 +02:00
| `arc_thickness` | 2 | Thickness of the arc |
| `show_current_level`| false | Show current charge level |
| `main_color` | `beautiful.fg_color` | Color of the text with the current charge level and the arc |
| `low_level_color` | #e53935 | Arc color when battery charge is less that 15% |
| `medium_level_color` | #c0ca33 | Arc color when battery charge is between 15% and 40% |
| `charging` | `beautiful.fg_color` | Color of the circle inside the arc when charging |
| `warning_msg_title` | _Huston, we have a problem_ | Title of the warning popup |
| `warning_msg_text` | _Battery is dying_ | Text of the warning popup |
| `warning_msg_position` | `bottom_right` | Position of the warning popup |
| `warning_msg_icon` | ~/.config/awesome/awesome-wm-widgets/batteryarc-widget/spaceman.jpg | Icon of the warning popup |
2017-10-09 23:14:03 +02:00
## Installation
Clone repo, include widget and use it in **rc.lua**:
```lua
local batteryarc_widget = require("awesome-wm-widgets.batteryarc-widget.batteryarc")
2017-10-09 23:14:03 +02:00
...
s.mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
...
2019-06-02 15:46:41 +02:00
--[[default]]
batteryarc_widget(),
--[[or customized]]
batteryarc_widget({
show_current_level = true,
thickness = '1',
}),
}
...
2017-10-09 23:14:03 +02:00
```
## Troubleshooting
In case of any doubts or questions please raise an [issue](https://github.com/streetturtle/awesome-wm-widgets/issues/new).