From 60f74904530058bf8b1cc9a2ee3972093381b19d Mon Sep 17 00:00:00 2001 From: Thomas Friese Date: Fri, 7 Feb 2020 10:27:02 +0100 Subject: Make backgrounds theme-able Fixes visibility on light themes Affects widgets: - `batteryarc` - `brightnessarc` - `volumearc` - `volumebar` Fixes #109 --- batteryarc-widget/README.md | 1 + batteryarc-widget/batteryarc.lua | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'batteryarc-widget') diff --git a/batteryarc-widget/README.md b/batteryarc-widget/README.md index ba65db7..97f5bcc 100644 --- a/batteryarc-widget/README.md +++ b/batteryarc-widget/README.md @@ -25,6 +25,7 @@ It is possible to customize widget by providing a table with all or some of the | `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 | +| `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` | `#43a047` | Color of the circle inside the arc when charging | diff --git a/batteryarc-widget/batteryarc.lua b/batteryarc-widget/batteryarc.lua index 315aca7..d4a67c5 100644 --- a/batteryarc-widget/batteryarc.lua +++ b/batteryarc-widget/batteryarc.lua @@ -27,6 +27,7 @@ local function worker(args) local show_current_level = args.show_current_level or false local main_color = args.main_color or beautiful.fg_color + local bg_color = args.bg_color or '#ffffff11' local low_level_color = args.low_level_color or '#e53935' local medium_level_color = args.medium_level_color or '#c0ca33' local charging_color = args.charging_color or '#43a047' @@ -54,7 +55,7 @@ local function worker(args) start_angle = 4.71238898, -- 2pi*3/4 forced_height = 18, forced_width = 18, - bg = "#ffffff11", + bg = bg_color, paddings = 2, widget = wibox.container.arcchart } -- cgit v1.2.3