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 })
|
menu = mymainmenu })
|
||||||
|
|
||||||
-- Create a systray
|
-- Create a systray
|
||||||
mysystray = widget({ type = "systray", align = "right" })
|
mysystray = widget({ type = "systray" })
|
||||||
|
|
||||||
-- Create a wibox for each screen and add it
|
-- Create a wibox for each screen and add it
|
||||||
mywibox = {}
|
mywibox = {}
|
||||||
|
@ -154,10 +154,10 @@ mytasklist.buttons = awful.util.table.join(
|
||||||
|
|
||||||
for s = 1, screen.count() do
|
for s = 1, screen.count() do
|
||||||
-- Create a promptbox for each screen
|
-- 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.
|
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
|
||||||
-- We need one layoutbox per screen.
|
-- 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(
|
mylayoutbox[s]:buttons(awful.util.table.join(
|
||||||
awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
|
awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
|
||||||
awful.button({ }, 3, 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
|
-- Create the wibox
|
||||||
mywibox[s] = awful.wibox({ position = "top", screen = s })
|
mywibox[s] = awful.wibox({ position = "top", screen = s })
|
||||||
-- Add widgets to the wibox - order matters
|
-- Add widgets to the wibox - order matters
|
||||||
mywibox[s].widgets = { mylauncher,
|
mywibox[s].widgets = {
|
||||||
mytaglist[s],
|
{
|
||||||
mytasklist[s],
|
mylauncher,
|
||||||
mypromptbox[s],
|
mytaglist[s],
|
||||||
mytextbox,
|
mypromptbox[s],
|
||||||
mylayoutbox[s],
|
layout = awful.widget.layout.horizontal.leftright
|
||||||
s == 1 and mysystray or nil }
|
},
|
||||||
|
mylayoutbox[s],
|
||||||
|
mytextbox,
|
||||||
|
s == 1 and mysystray or nil,
|
||||||
|
mytasklist[s],
|
||||||
|
layout = awful.widget.layout.horizontal.rightleft
|
||||||
|
}
|
||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue