awesome-wm-widgets/batteryarc-widget
Allan Siqueira a3bfe03f7f
FIx parameter error on readme
This parameter is missing the `_color` postfix.
Just a quick refactor, to save time debugging the widget
2020-05-29 04:24:04 -03:00
..
10_c.png batteryarc widget 2017-10-09 17:14:03 -04:00
10_d.png batteryarc widget 2017-10-09 17:14:03 -04:00
20_c.png batteryarc widget 2017-10-09 17:14:03 -04:00
20_d.png batteryarc widget 2017-10-09 17:14:03 -04:00
80_c.png batteryarc widget 2017-10-09 17:14:03 -04:00
80_d.png batteryarc widget 2017-10-09 17:14:03 -04:00
README.md FIx parameter error on readme 2020-05-29 04:24:04 -03:00
batteryarc.lua Fix #141 simplify calculation of the battery chage status 2020-05-12 22:12:20 -04:00
spaceman.jpg place battery-arc warning icon inside widget folder 2019-03-23 22:41:06 -04:00
warning.png externalize config of batteryarc widget 2019-06-01 22:55:13 -04:00

README.md

Batteryarc widget

This widget is more informative version of battery widget.

Depending of the battery status it could look following ways:

  • 10_d - less than 15 percent
  • 10_c - less than 15 percent, charging
  • 20_d - between 15 and 40 percent
  • 20_c - between 15 and 40 percent, charging
  • 80_d - more than 40 percent
  • 80_c - more than 40 percent, charging

If a battery level is low then warning popup will show up:

warning

Customization

It is possible to customize widget by providing a table with all or some of the following config parameters:

Name Default Description
font Play 6 Font
arc_thickness 2 Thickness of the arc
show_current_level false Show current charge level
size 18 Size of the widget
main_color beautiful.fg_color Color of the text with the current charge level and the arc
bg_color #ffffff11 Color of the charge level background
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_color #43a047 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
enable_battery_warning true Display low battery warning

Requirements

This widget requires the acpi command to be available to retrieve battery and power information.

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,
            arc_thickness = 1,
        }),
	}
	...

Troubleshooting

In case of any doubts or questions please raise an issue.