save max layout as well, because why the fuck not
This commit is contained in:
parent
12b770a8b9
commit
930bd05304
1 changed files with 5 additions and 2 deletions
7
rc.lua
7
rc.lua
|
@ -159,7 +159,7 @@ tags = {}
|
||||||
saved_layouts = {}
|
saved_layouts = {}
|
||||||
for s = 1, screen.count() do
|
for s = 1, screen.count() do
|
||||||
tags[s] = { name = {}, layout = {} }
|
tags[s] = { name = {}, layout = {} }
|
||||||
saved_layouts[s] = { tiled = {} }
|
saved_layouts[s] = { tiled = {}, max = {} }
|
||||||
end
|
end
|
||||||
-- screen 1
|
-- screen 1
|
||||||
--tags[1].name = {
|
--tags[1].name = {
|
||||||
|
@ -195,6 +195,7 @@ for s = 1, screen.count() do
|
||||||
else
|
else
|
||||||
saved_layouts[s].tiled[name] = default_tiled
|
saved_layouts[s].tiled[name] = default_tiled
|
||||||
end
|
end
|
||||||
|
saved_layouts[s].max[name] = layouts.max[1]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- Set tags instances in wm
|
-- Set tags instances in wm
|
||||||
|
@ -435,10 +436,12 @@ globalkeys = awful.util.table.join(
|
||||||
function ()
|
function ()
|
||||||
local screen = mouse.screen
|
local screen = mouse.screen
|
||||||
local current_layout = awful.layout.get(screen)
|
local current_layout = awful.layout.get(screen)
|
||||||
|
local tag = awful.tag.selected(screen).name
|
||||||
if not enters(current_layout, layouts.max) then
|
if not enters(current_layout, layouts.max) then
|
||||||
awful.layout.set(layouts.max[1])
|
awful.layout.set(saved_layouts[screen].max[tag])
|
||||||
else
|
else
|
||||||
awful.layout.inc(layouts.max, 1)
|
awful.layout.inc(layouts.max, 1)
|
||||||
|
saved_layouts[screen].max[tag] = awful.layout.get(screen)
|
||||||
end
|
end
|
||||||
end),
|
end),
|
||||||
awful.key({ modkey, }, 't',
|
awful.key({ modkey, }, 't',
|
||||||
|
|
Loading…
Reference in a new issue