mirror of
https://github.com/streetturtle/awesome-wm-widgets.git
synced 2024-11-17 07:49:09 +01:00
.. | ||
10_c.png | ||
10_d.png | ||
20_c.png | ||
20_d.png | ||
80_c.png | ||
80_d.png | ||
batteryarc.lua | ||
README.md | ||
spaceman.jpg | ||
warning.png |
Batteryarc widget
This widget is more informative version of battery widget.
Depending of the battery status it could look following ways:
- - less than 15 percent
- - less than 15 percent, charging
- - between 15 and 40 percent
- - between 15 and 40 percent, charging
- - more than 40 percent
- - more than 40 percent, charging
If a battery level is low then warning popup will show up:
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 |
arc_thickness |
Thickness of the arc | 2 |
show_current_level |
Show current charge level | false |
main_color |
Color of the text with the current charge level and the arc | beautiful.fg_color |
low_level_color |
Arc color when battery charge is less that 15% | #e53935 |
medium_level_color |
Arc color when battery charge is between 15% and 40% | #c0ca33 |
charging |
Color of the circle inside the arc when charging | beautiful.fg_color |
warning_msg_title |
Title of the warning popup | Huston, we have a problem |
warning_msg_text |
Text of the warning popup | Battery is dying |
warning_msg_position |
Position of the warning popup | bottom_right |
warning_msg_icon |
Icon of the warning popup | ~/.config/awesome/awesome-wm-widgets/batteryarc-widget/spaceman.jpg |
Installation
Clone repo, include widget and use it in rc.lua:
local batteryarc_widget = require("awesome-wm-widgets.batteryarc-widget.batteryarc")
...
s.mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
...
--[[default]]
batteryarc_widget(),
--[[or customized]]
batteryarc_widget({
show_current_level = true,
thickness = '1',
}),
}
...
Troubleshooting
In case of any doubts or questions please raise an issue.