Module: awful.layout

Layout module for awful.

Info:

  • Copyright: 2008 Julien Danjou
  • Originally authored by: Julien Danjou <julien@danjou.info>
    (Full contributors list available on our github project)

Static module functions

awful.layout.get_tag_layout_index (t) -> nil or number Return the tag layout index (from awful.layout.layouts).
awful.layout.get (screen) -> () Get the current layout.
awful.layout.inc (i, s[, layouts]) Change the layout of the current tag.
awful.layout.set (_layout[, t=mouse.screen.selected_tag]) Set the layout function of the current tag.
awful.layout.parameters ([t[, screen]]) -> table Get the layout parameters used for the screen

This should give the same result as "arrange", but without the "geometries" parameter, as this is computed during arranging.

awful.layout.arrange (screen) Arrange a screen using its current layout.
awful.layout.append_default_layout (to_add) Append a layout to the list of default tag layouts.
awful.layout.remove_default_layout (to_remove) -> boolean Remove a layout from the list of default layouts.
awful.layout.append_default_layouts (layouts) Append many layouts to the list of default tag layouts.
awful.layout.getname (_layout) -> () Get the current layout name.

Request handlers

awful.layout.move_handler Default handler for request::geometry signals for tiled clients with the "mouse.move" context.

Theme variables

beautiful.layout_cornernw surface The cornernw layout layoutbox icon.
beautiful.layout_cornerne surface The cornerne layout layoutbox icon.
beautiful.layout_cornersw surface The cornersw layout layoutbox icon.
beautiful.layout_cornerse surface The cornerse layout layoutbox icon.
beautiful.layout_fairh surface The fairh layout layoutbox icon.
beautiful.layout_fairv surface The fairv layout layoutbox icon.
beautiful.layout_floating surface The floating layout layoutbox icon.
beautiful.layout_magnifier surface The magnifier layout layoutbox icon.
beautiful.layout_max surface The max layout layoutbox icon.
beautiful.layout_fullscreen surface The fullscreen layout layoutbox icon.
beautiful.layout_spiral surface The spiral layout layoutbox icon.
beautiful.layout_dwindle surface The dwindle layout layoutbox icon.
beautiful.layout_tile surface The tile layout layoutbox icon.
beautiful.layout_tiletop surface The tile top layout layoutbox icon.
beautiful.layout_tilebottom surface The tile bottom layout layoutbox icon.
beautiful.layout_tileleft surface The tile left layout layoutbox icon.

Client layouts

awful.layout.suit.corner.nw Corner layout.
awful.layout.suit.corner.ne Corner layout.
awful.layout.suit.corner.sw Corner layout.
awful.layout.suit.corner.se Corner layout.
awful.layout.suit.fair The fair layout.
awful.layout.suit.fair.horizontal The horizontal fair layout.
awful.layout.suit.floating The floating layout.
awful.layout.suit.magnifier The magnifier layout.
awful.layout.suit.max Maximized layout.
awful.layout.suit.max.fullscreen Fullscreen layout.
awful.layout.suit.spiral.dwindle Dwindle layout.
awful.layout.suit.spiral.name Spiral layout.
awful.layout.suit.tile.right The main tile algo, on the right.
awful.layout.suit.tile.left The main tile algo, on the left.
awful.layout.suit.tile.bottom The main tile algo, on the bottom.
awful.layout.suit.tile.top The main tile algo, on the top.

Fields

awful.layout.layouts N/A The default list of layouts.
awful.layout.floating.resize_jump_to_corner N/A Jump mouse cursor to the client's corner when resizing it.
awful.layout.tile.resize_jump_to_corner N/A Jump mouse cursor to the client's corner when resizing it.


Static module functions

awful.layout.get_tag_layout_index (t) -> nil or number
Return the tag layout index (from awful.layout.layouts).

If the layout isn't part of awful.layout.layouts, this function returns nil.

Parameters:

  • t tag The tag.

Returns:

    nil or number The layout index.
awful.layout.get (screen) -> ()
Get the current layout.

Parameters:

  • screen The screen.

Returns:

    The layout function.
awful.layout.inc (i, s[, layouts])
Change the layout of the current tag.

Parameters:

  • i Relative index.
  • s The screen.
  • layouts A table of layouts. (optional)
awful.layout.set (_layout[, t=mouse.screen.selected_tag])
Set the layout function of the current tag.

Parameters:

  • _layout Layout name.
  • t tag The tag to modify. (default mouse.screen.selected_tag)
awful.layout.parameters ([t[, screen]]) -> table
Get the layout parameters used for the screen

This should give the same result as "arrange", but without the "geometries" parameter, as this is computed during arranging.

If t is given, screen is ignored, if none are given, the mouse screen is used.

Parameters:

  • t tag The tag to query (optional)
  • screen The screen (optional)

Returns:

    table A table with the workarea (x, y, width, height), the screen geometry (x, y, width, height), the clients, the screen and sometime, a "geometries" table with client as keys and geometry as value
awful.layout.arrange (screen)
Arrange a screen using its current layout.

Parameters:

  • screen The screen to arrange.
awful.layout.append_default_layout (to_add)
Append a layout to the list of default tag layouts.

Parameters:

  • to_add layout A valid tag layout.

See also:

awful.layout.remove_default_layout (to_remove) -> boolean

Remove a layout from the list of default layouts.

Usage example output:

Before: floating
Before: tile
Before: max
After:  floating
After:  max

Parameters:

  • to_remove layout A valid tag layout.

Returns:

    boolean True if the layout was found and removed.

See also:

Usage:

    awful.layout.append_default_layouts({
        awful.layout.suit.floating,
        awful.layout.suit.tile,
        awful.layout.suit.max,
    })
    for _, l in ipairs(awful.layout.layouts) do
        print("Before:", l.name)
    end
    
    awful.layout.remove_default_layout(awful.layout.suit.tile)
    
    for _, l in ipairs(awful.layout.layouts) do
        print("After:", l.name)
    end
awful.layout.append_default_layouts (layouts)
Append many layouts to the list of default tag layouts.

Parameters:

  • layouts table A table of valid tag layout.

See also:

awful.layout.getname (_layout) -> ()
Get the current layout name.

Parameters:

  • _layout The layout.

Returns:

    The layout name.

Request handlers

awful.layout.move_handler
Default handler for request::geometry signals for tiled clients with the "mouse.move" context.

Arguments:

  • c client The client
  • context string The context
  • hints table Additional hints

Theme variables

beautiful.layout_cornernw surface
The cornernw layout layoutbox icon.

See also:

beautiful.layout_cornerne surface
The cornerne layout layoutbox icon.

See also:

beautiful.layout_cornersw surface
The cornersw layout layoutbox icon.

See also:

beautiful.layout_cornerse surface
The cornerse layout layoutbox icon.

See also:

beautiful.layout_fairh surface
The fairh layout layoutbox icon.

See also:

beautiful.layout_fairv surface
The fairv layout layoutbox icon.

See also:

beautiful.layout_floating surface
The floating layout layoutbox icon.

See also:

beautiful.layout_magnifier surface
The magnifier layout layoutbox icon.

See also:

beautiful.layout_max surface
The max layout layoutbox icon.

See also:

beautiful.layout_fullscreen surface
The fullscreen layout layoutbox icon.

See also:

beautiful.layout_spiral surface
The spiral layout layoutbox icon.

See also:

beautiful.layout_dwindle surface
The dwindle layout layoutbox icon.

See also:

beautiful.layout_tile surface
The tile layout layoutbox icon.

See also:

beautiful.layout_tiletop surface
The tile top layout layoutbox icon.

See also:

beautiful.layout_tilebottom surface
The tile bottom layout layoutbox icon.

See also:

beautiful.layout_tileleft surface
The tile left layout layoutbox icon.

See also:

Client layouts

awful.layout.suit.corner.nw
Corner layout. Display master client in a corner of the screen, and slaves in one column and one row around the master.
awful.layout.suit.corner.ne
Corner layout. Display master client in a corner of the screen, and slaves in one column and one row around the master.
awful.layout.suit.corner.sw
Corner layout. Display master client in a corner of the screen, and slaves in one column and one row around the master.
awful.layout.suit.corner.se
Corner layout. Display master client in a corner of the screen, and slaves in one column and one row around the master.
awful.layout.suit.fair
The fair layout. Try to give all clients the same size.
awful.layout.suit.fair.horizontal
The horizontal fair layout. Try to give all clients the same size.
awful.layout.suit.floating
The floating layout.
awful.layout.suit.magnifier
The magnifier layout.
awful.layout.suit.max
Maximized layout.
awful.layout.suit.max.fullscreen
Fullscreen layout.
awful.layout.suit.spiral.dwindle
Dwindle layout.
awful.layout.suit.spiral.name
Spiral layout.
awful.layout.suit.tile.right
The main tile algo, on the right.

Parameters:

  • screen The screen number to tile.
awful.layout.suit.tile.left
The main tile algo, on the left.

Parameters:

  • screen The screen number to tile.
awful.layout.suit.tile.bottom
The main tile algo, on the bottom.

Parameters:

  • screen The screen number to tile.
awful.layout.suit.tile.top
The main tile algo, on the top.

Parameters:

  • screen The screen number to tile.

Fields

awful.layout.layouts N/A

The default list of layouts.

The default value is:

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,
awful.layout.suit.corner.nw,
awful.layout.suit.corner.ne,
awful.layout.suit.corner.sw,
awful.layout.suit.corner.se,
awful.layout.floating.resize_jump_to_corner N/A
Jump mouse cursor to the client's corner when resizing it.
awful.layout.tile.resize_jump_to_corner N/A
Jump mouse cursor to the client's corner when resizing it.
generated by LDoc 1.4.6 Last updated 2021-11-13 00:35:50