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 --- volumebar-widget/README.md | 1 + volumebar-widget/volumebar.lua | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'volumebar-widget') diff --git a/volumebar-widget/README.md b/volumebar-widget/README.md index 2b27c60..b4a4578 100644 --- a/volumebar-widget/README.md +++ b/volumebar-widget/README.md @@ -16,6 +16,7 @@ It is possible to customize widget by providing a table with all or some of the | Name | Default | Description | |---|---|---| | `main_color` | `beautiful.fg_normal` | Color of the bar | +| `bg_color` | `#ffffff11` | Color of the bar's background | | `mute_color` | `beautiful.fg_urgent` | Color of the bar when mute | | `width` | 50 | The bar width | | `shape` | `bar` | [gears.shape](https://awesomewm.org/doc/api/libraries/gears.shape.html), could be `octogon`, `hexagon`, `powerline`, etc | diff --git a/volumebar-widget/volumebar.lua b/volumebar-widget/volumebar.lua index 18e0f40..827a3c0 100644 --- a/volumebar-widget/volumebar.lua +++ b/volumebar-widget/volumebar.lua @@ -28,6 +28,7 @@ local function worker(args) local main_color = args.main_color or beautiful.fg_normal local mute_color = args.mute_color or beautiful.fg_urgent + local bg_color = args.bg_color or '#ffffff11' local width = args.width or 50 local shape = args.shape or 'bar' local margins = args.margins or 10 @@ -41,7 +42,7 @@ local function worker(args) max_value = 1, forced_width = width, color = main_color, - background_color = '#ffffff11', + background_color = bg_color, shape = gears.shape[shape], margins = { top = margins, -- cgit v1.2.3