diff options
author | Thomas Friese <tasmo@tasmo.de> | 2020-02-07 10:27:02 +0100 |
---|---|---|
committer | Thomas Friese <tasmo@tasmo.de> | 2020-02-07 10:27:02 +0100 |
commit | 60f74904530058bf8b1cc9a2ee3972093381b19d (patch) | |
tree | 09537fb618f42a2b2208d4ab89d60931f83c4d0a /brightnessarc-widget | |
parent | 8839e853df93c50ed5ff7c034915cd32a1c3e12a (diff) |
Make backgrounds theme-able
Fixes visibility on light themes
Affects widgets:
- `batteryarc`
- `brightnessarc`
- `volumearc`
- `volumebar`
Fixes #109
Diffstat (limited to 'brightnessarc-widget')
-rw-r--r-- | brightnessarc-widget/README.md | 1 | ||||
-rw-r--r-- | brightnessarc-widget/brightnessarc.lua | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/brightnessarc-widget/README.md b/brightnessarc-widget/README.md index e63f0dd..4109910 100644 --- a/brightnessarc-widget/README.md +++ b/brightnessarc-widget/README.md @@ -12,6 +12,7 @@ It is possible to customize widget by providing a table with all or some of the | `inc_brightness_cmd` | `light -A 5` | Increase brightness | | `dec_brightness_cmd` | `light -U 5`| Decrease brightness | | `color` | `beautiful.fg_color` | Color of the arc | +| `bg_color` | `#ffffff11` | Color of the arc's background | | `path_to_icon` | `/usr/share/icons/Arc/status/symbolic/display-brightness-symbolic.svg` | Path to the icon | ### Example: diff --git a/brightnessarc-widget/brightnessarc.lua b/brightnessarc-widget/brightnessarc.lua index 3c4641e..6d3a769 100644 --- a/brightnessarc-widget/brightnessarc.lua +++ b/brightnessarc-widget/brightnessarc.lua @@ -28,6 +28,7 @@ local function worker(args) local inc_brightness_cmd = args.inc_brightness_cmd or INC_BRIGHTNESS_CMD local dec_brightness_cmd = args.dec_brightness_cmd or DEC_BRIGHTNESS_CMD local color = args.color or beautiful.fg_color + local bg_color = args.bg_color or '#ffffff11' local path_to_icon = args.path_to_icon or PATH_TO_ICON local icon = { @@ -44,7 +45,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, colors = {color}, widget = wibox.container.arcchart |