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 /volumebar-widget | |
parent | 8839e853df93c50ed5ff7c034915cd32a1c3e12a (diff) |
Make backgrounds theme-able
Fixes visibility on light themes
Affects widgets:
- `batteryarc`
- `brightnessarc`
- `volumearc`
- `volumebar`
Fixes #109
Diffstat (limited to 'volumebar-widget')
-rw-r--r-- | volumebar-widget/README.md | 1 | ||||
-rw-r--r-- | volumebar-widget/volumebar.lua | 3 |
2 files changed, 3 insertions, 1 deletions
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, |