summaryrefslogtreecommitdiff
path: root/batteryarc-widget
diff options
context:
space:
mode:
authorThomas Friese <tasmo@tasmo.de>2020-02-07 10:27:02 +0100
committerThomas Friese <tasmo@tasmo.de>2020-02-07 10:27:02 +0100
commit60f74904530058bf8b1cc9a2ee3972093381b19d (patch)
tree09537fb618f42a2b2208d4ab89d60931f83c4d0a /batteryarc-widget
parent8839e853df93c50ed5ff7c034915cd32a1c3e12a (diff)
Make backgrounds theme-able
Fixes visibility on light themes Affects widgets: - `batteryarc` - `brightnessarc` - `volumearc` - `volumebar` Fixes #109
Diffstat (limited to 'batteryarc-widget')
-rw-r--r--batteryarc-widget/README.md1
-rw-r--r--batteryarc-widget/batteryarc.lua3
2 files changed, 3 insertions, 1 deletions
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
}