rc.lua: Be consistent about how the wibar is created.

The syntax was a leftover from ancient time where the wibar
constructor could not forward the properties to the wibox and
when the wibox didn't take a `widget` argument.

I make this change mostly to be consistent with the documentation
examples.
This commit is contained in:
Emmanuel Lepage Vallee 2021-07-05 17:03:35 -07:00
parent 67dc363437
commit 0828c20a55
1 changed files with 21 additions and 20 deletions

View File

@ -179,26 +179,27 @@ screen.connect_signal("request::desktop_decoration", function(s)
-- @DOC_WIBAR@ -- @DOC_WIBAR@
-- Create the wibox -- Create the wibox
s.mywibox = awful.wibar({ position = "top", screen = s }) s.mywibox = awful.wibar {
position = "top",
-- @DOC_SETUP_WIDGETS@ screen = s,
-- Add widgets to the wibox -- @DOC_SETUP_WIDGETS@
s.mywibox.widget = { widget = {
layout = wibox.layout.align.horizontal, layout = wibox.layout.align.horizontal,
{ -- Left widgets { -- Left widgets
layout = wibox.layout.fixed.horizontal, layout = wibox.layout.fixed.horizontal,
mylauncher, mylauncher,
s.mytaglist, s.mytaglist,
s.mypromptbox, s.mypromptbox,
}, },
s.mytasklist, -- Middle widget s.mytasklist, -- Middle widget
{ -- Right widgets { -- Right widgets
layout = wibox.layout.fixed.horizontal, layout = wibox.layout.fixed.horizontal,
mykeyboardlayout, mykeyboardlayout,
wibox.widget.systray(), wibox.widget.systray(),
mytextclock, mytextclock,
s.mylayoutbox, s.mylayoutbox,
}, },
}
} }
end) end)
-- }}} -- }}}