Skip to content

Commit 5d58830

Browse files
authored
Merge pull request #471 from NStefan002/master
feat(brightness-widget): add `size` and `arc_thickness` options
2 parents 60fb36e + 571f936 commit 5d58830

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

brightness-widget/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ It is possible to customize widget by providing a table with all or some of the
1818
| `tooltip` | false | Display brightness level in a tooltip when the mouse cursor hovers the widget |
1919
| `percentage` | false | Display a '%' character after the brightness level |
2020
| `rmb_set_max` | false | Right mouse click sets the brightness level to maximum |
21+
| `size` | 18 | Size of the widget (used only for `arc` type) |
22+
| `arc_thickness` | 2 | Thickness of the arc (used only for `arc` type) |
2123

2224
_Note:_ If brightness is controlled only by the widget (either by a mouse, or by a shortcut, then the `timeout` could be quite big, as there is no reason to synchronize the brightness level).
2325

brightness-widget/brightness.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ local function worker(user_args)
3939
local path_to_icon = args.path_to_icon or ICON_DIR .. 'brightness.svg'
4040
local font = args.font or beautiful.font
4141
local timeout = args.timeout or 100
42+
local size = args.size or 18
43+
local arc_thickness = args.arc_thickness or 2
4244

4345
local program = args.program or 'light'
4446
local step = args.step or 5
@@ -105,10 +107,10 @@ local function worker(user_args)
105107
layout = wibox.container.place
106108
},
107109
max_value = 100,
108-
thickness = 2,
110+
thickness = arc_thickness,
109111
start_angle = 4.71238898, -- 2pi*3/4
110-
forced_height = 18,
111-
forced_width = 18,
112+
forced_height = size,
113+
forced_width = size,
112114
paddings = 2,
113115
widget = wibox.container.arcchart,
114116
set_value = function(self, level)

0 commit comments

Comments
 (0)