You are not logged in.

#1 2013-11-17 01:06:26

junex
Member
Registered: 2013-02-21
Posts: 13

[SOLVED] Disable layouts in Awesome WM

Hello! I'm trying to comment out some layouts I don't need from rc.lua but it causes an error :

/usr/share/lib/awesome/awful/layout/init.lua:84:  attempt to call field 'arrange' (a nil value)

Here's my tag setup:

-- {{{ Tags
-- Define a tag table which will hold all screen tags.
        tags = {
        names  = { "a", "b", "c", "d", "e" },
        layout = { layouts[1], layouts[5], layouts[4], layouts[11], layouts[2],
                }}
                        for s = 1, screen.count() do
                        -- Each screen has its own tag table.
                        tags[s] = awful.tag(tags.names, s, tags.layout)
                        end
-- }}}

If I comment it like this, I've got this error on tag "d" (which has layout max.fullscreen):

layouts =
{
    awful.layout.suit.floating,
    awful.layout.suit.tile,
    awful.layout.suit.tile.left,
    awful.layout.suit.tile.bottom,
    awful.layout.suit.tile.top,
    awful.layout.suit.fair,
    awful.layout.suit.fair.horizontal,
    --awful.layout.suit.spiral,
    --awful.layout.suit.spiral.dwindle,
    awful.layout.suit.max,
    awful.layout.suit.max.fullscreen
    --awful.layout.suit.magnifier
}

What am I missing here?

Last edited by junex (2013-11-17 14:21:23)

Offline

#2 2013-11-17 01:42:41

Steef435
Member
Registered: 2013-08-29
Posts: 577
Website

Re: [SOLVED] Disable layouts in Awesome WM

If you comment a line out it won't be parsed by the interpreter. This is how the interpreter reads your layouts table/array(?):

layouts =
{
    awful.layout.suit.floating,
    awful.layout.suit.tile,
    awful.layout.suit.tile.left,
    awful.layout.suit.tile.bottom,
    awful.layout.suit.tile.top,
    awful.layout.suit.fair,
    awful.layout.suit.fair.horizontal,
    awful.layout.suit.max,
    awful.layout.suit.max.fullscreen
}

That makes a total of 9 elements, instead of the 12 you had before you commented a few out. In layout you specify that the layout of tag 4("d") is element 11 of layouts. Awesome tries to access element 11 of layouts, but that doesn't exist (anymore), because right now you have just 9 elements in layout.

Offline

#3 2013-11-17 02:12:06

junex
Member
Registered: 2013-02-21
Posts: 13

Re: [SOLVED] Disable layouts in Awesome WM

Thank you !!!

Offline

Board footer

Powered by FluxBB