From 1908bd3d57cd721a4eb68dcf5cfb711b80e09269 Mon Sep 17 00:00:00 2001 From: Gregor Best Date: Tue, 10 Mar 2009 19:31:28 +0100 Subject: [PATCH] awesomerc.lua: add support for widget layouts Signed-off-by: Gregor Best Signed-off-by: Julien Danjou --- awesomerc.lua.in | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/awesomerc.lua.in b/awesomerc.lua.in index fb3b25e3..c7a3403e 100644 --- a/awesomerc.lua.in +++ b/awesomerc.lua.in @@ -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 -- }}}