update rc.lua to new widget layouts

Signed-off-by: Lukas Hrazky <lukkash@email.cz>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Lukas Hrazky 2009-10-24 15:06:54 +02:00 committed by Julien Danjou
parent ec33544896
commit 4685023a28
1 changed files with 18 additions and 15 deletions

View File

@ -116,7 +116,7 @@ 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({ layout = awful.widget.layout.horizontal.leftright }) mypromptbox[s] = awful.widget.prompt()
-- 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) mylayoutbox[s] = awful.widget.layoutbox(s)
@ -126,28 +126,31 @@ for s = 1, screen.count() do
awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end), awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end))) awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
-- Create a taglist widget -- Create a taglist widget
mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons) mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons)
-- Create a tasklist widget -- Create a tasklist widget
mytasklist[s] = awful.widget.tasklist(function(c) mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons)
return awful.widget.tasklist.label.currenttags(c, s)
end, mytasklist.buttons)
-- Create the wibox -- Create the wibox
mywibox[s] = awful.wibox({ position = "top", screen = s }) mywibox[s] = awful.wibox({ position = "top", screen = s })
-- Create a table with widgets that go to the right
right_aligned = {
layout = awful.widget.layout.horizontal.rightleft
}
if s == 1 then table.insert(right_aligned, mysystray) end
table.insert(right_aligned, mytextclock)
table.insert(right_aligned, mylayoutbox[s])
-- Add widgets to the wibox - order matters -- Add widgets to the wibox - order matters
mywibox[s].widgets = { mywibox[s].widgets = {
{ mylauncher,
mylauncher, mytaglist[s],
mytaglist[s], mypromptbox[s],
mypromptbox[s], right_aligned,
layout = awful.widget.layout.horizontal.leftright
},
mylayoutbox[s],
mytextclock,
s == 1 and mysystray or nil,
mytasklist[s], mytasklist[s],
layout = awful.widget.layout.horizontal.rightleft layout = awful.widget.layout.horizontal.leftright,
height = mywibox[s].height
} }
end end
-- }}} -- }}}