From 1bf3c96f08bd247a8cbb0d0950528500c46e508a Mon Sep 17 00:00:00 2001 From: Von Random Date: Mon, 16 Mar 2015 01:35:50 +0300 Subject: [PATCH] do not make newly spawned windows master, set default tiled layout to tiledright for main screen and tiledleft to all others --- rc.lua | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/rc.lua b/rc.lua index 342ae8a..7fdef12 100644 --- a/rc.lua +++ b/rc.lua @@ -123,7 +123,6 @@ local layouts = { awful.layout.suit.magnifier } } -layouts.tiled['default'] = layouts.tiled[3] -- }}} -- {{{ Wallpaper if beautiful.wallpaper then @@ -156,15 +155,23 @@ if screen.count() >= 2 then end -- Fill the missing values with defaults for s = 1, screen.count() do + -- Set default tiled layout for all the screens + -- if s == 1 and screen.count() ~= 1 then -- in case I ever want to have default for less than 2 screens + if s == 1 then + default_tiled = layouts.tiled[3] + else + default_tiled = layouts.tiled[1] + end for tag = 1, 9 do local name = tags[s].name[tag] or tag - local layout = tags[s].layout[tag] or layouts.tiled['default'] + local layout = tags[s].layout[tag] or default_tiled tags[s].name[tag] = name tags[s].layout[tag] = layout + -- Assign saved tiled layout so that we can use it right away if enters(layout, layouts.tiled) then saved_layouts[s].tiled[name] = layout else - saved_layouts[s].tiled[name] = layouts.tiled['default'] + saved_layouts[s].tiled[name] = default_tiled end end end @@ -535,7 +542,8 @@ awful.rules.rules = { border_color = beautiful.border_normal, focus = awful.client.focus.filter, keys = clientkeys, - buttons = clientbuttons + buttons = clientbuttons, + callback = awful.client.setslave } }, -- Floating only rules: