awesomerc.lua: add support for widget layouts
Signed-off-by: Gregor Best <farhaven@googlemail.com> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
2820e5f2e8
commit
1908bd3d57
|
@ -111,7 +111,7 @@ mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
|
|||
menu = mymainmenu })
|
||||
|
||||
-- Create a systray
|
||||
mysystray = widget({ type = "systray", align = "right" })
|
||||
mysystray = widget({ type = "systray" })
|
||||
|
||||
-- Create a wibox for each screen and add it
|
||||
mywibox = {}
|
||||
|
@ -154,10 +154,10 @@ mytasklist.buttons = awful.util.table.join(
|
|||
|
||||
for s = 1, screen.count() do
|
||||
-- Create a promptbox for each screen
|
||||
mypromptbox[s] = awful.widget.prompt({ align = "left" })
|
||||
mypromptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.leftright })
|
||||
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
|
||||
-- We need one layoutbox per screen.
|
||||
mylayoutbox[s] = awful.widget.layoutbox(s, { align = "right" })
|
||||
mylayoutbox[s] = awful.widget.layoutbox(s)
|
||||
mylayoutbox[s]:buttons(awful.util.table.join(
|
||||
awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
|
||||
awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
|
||||
|
@ -174,13 +174,19 @@ for s = 1, screen.count() do
|
|||
-- Create the wibox
|
||||
mywibox[s] = awful.wibox({ position = "top", screen = s })
|
||||
-- Add widgets to the wibox - order matters
|
||||
mywibox[s].widgets = { mylauncher,
|
||||
mytaglist[s],
|
||||
mytasklist[s],
|
||||
mypromptbox[s],
|
||||
mytextbox,
|
||||
mylayoutbox[s],
|
||||
s == 1 and mysystray or nil }
|
||||
mywibox[s].widgets = {
|
||||
{
|
||||
mylauncher,
|
||||
mytaglist[s],
|
||||
mypromptbox[s],
|
||||
layout = awful.widget.layout.horizontal.leftright
|
||||
},
|
||||
mylayoutbox[s],
|
||||
mytextbox,
|
||||
s == 1 and mysystray or nil,
|
||||
mytasklist[s],
|
||||
layout = awful.widget.layout.horizontal.rightleft
|
||||
}
|
||||
end
|
||||
-- }}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue