Make 'layouts' global
This commit is contained in:
parent
1c19d4c655
commit
bfc6065ad9
|
@ -53,8 +53,7 @@ editor_cmd = terminal .. " -e " .. editor
|
|||
modkey = "Mod4"
|
||||
|
||||
-- Table of layouts to cover with awful.layout.inc, order matters.
|
||||
local layouts =
|
||||
{
|
||||
awful.layout.layouts = {
|
||||
awful.layout.suit.floating,
|
||||
awful.layout.suit.tile,
|
||||
awful.layout.suit.tile.left,
|
||||
|
@ -83,7 +82,7 @@ end
|
|||
tags = {}
|
||||
for s = 1, screen.count() do
|
||||
-- Each screen has its own tag table.
|
||||
tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, layouts[1])
|
||||
tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, awful.layout.layouts[1])
|
||||
end
|
||||
-- }}}
|
||||
|
||||
|
@ -169,10 +168,10 @@ for s = 1, screen.count() do
|
|||
-- We need one layoutbox per screen.
|
||||
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),
|
||||
awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
|
||||
awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
|
||||
awful.button({ }, 1, function () awful.layout.inc(awful.layout.layouts, 1) end),
|
||||
awful.button({ }, 3, function () awful.layout.inc(awful.layout.layouts, -1) end),
|
||||
awful.button({ }, 4, function () awful.layout.inc(awful.layout.layouts, 1) end),
|
||||
awful.button({ }, 5, function () awful.layout.inc(awful.layout.layouts, -1) end)))
|
||||
-- Create a taglist widget
|
||||
mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons)
|
||||
|
||||
|
@ -255,8 +254,8 @@ globalkeys = awful.util.table.join(
|
|||
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
|
||||
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
|
||||
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
|
||||
awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
|
||||
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
|
||||
awful.key({ modkey, }, "space", function () awful.layout.inc(awful.layout.layouts, 1) end),
|
||||
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(awful.layout.layouts, -1) end),
|
||||
|
||||
awful.key({ modkey, "Control" }, "n", awful.client.restore),
|
||||
|
||||
|
|
|
@ -22,6 +22,22 @@ local client = require("awful.client")
|
|||
local layout = {}
|
||||
layout.suit = require("awful.layout.suit")
|
||||
|
||||
-- The default list of layouts
|
||||
layout.layouts = {
|
||||
layout.suit.floating,
|
||||
layout.suit.tile,
|
||||
layout.suit.tile.left,
|
||||
layout.suit.tile.bottom,
|
||||
layout.suit.tile.top,
|
||||
layout.suit.fair,
|
||||
layout.suit.fair.horizontal,
|
||||
layout.suit.spiral,
|
||||
layout.suit.spiral.dwindle,
|
||||
layout.suit.max,
|
||||
layout.suit.max.fullscreen,
|
||||
layout.suit.magnifier
|
||||
}
|
||||
|
||||
-- This is a special lock used by the arrange function.
|
||||
-- This avoids recurring call by emitted signals.
|
||||
local arrange_lock = false
|
||||
|
|
Loading…
Reference in New Issue