Skip to content

Commit

Permalink
widget: Use module-level widget options directly
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrd committed Oct 16, 2020
1 parent 63e552f commit aeba062
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions widget.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,6 @@ function widget.update_widgets()
end

function widget.new(cmd, data)
local defaults = {
color = beautiful.bg_focus,
border_color = beautiful.fg_normal,
width = 20,
margins = 2,
}

gears.table.crush(defaults, widget)

return wibox.widget {
{
{
Expand All @@ -83,16 +74,16 @@ function widget.new(cmd, data)
min_value = 0,
max_value = data.timeout,
value = data.timeout,
color = defaults.color,
border_color = defaults.border_color,
color = widget.color,
border_color = widget.border_color,
widget = wibox.container.radialprogressbar,
},
id = "id_margin",
margins = defaults.margins,
margins = widget.margins,
layout = wibox.container.margin,
},
id = "id_const",
width = defaults.width,
width = widget.width,
layout = wibox.container.constraint,
},
{
Expand Down

0 comments on commit aeba062

Please sign in to comment.