mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
2a2166d856
Layouts are passed a data structure that holds all the information they need to render the clients. Signed-off-by: Julien Danjou <julien@danjou.info>
41 lines
959 B
Lua
41 lines
959 B
Lua
---------------------------------------------------------------------------
|
|
-- @author Julien Danjou <julien@danjou.info>
|
|
-- @copyright 2008 Julien Danjou
|
|
-- @release @AWESOME_VERSION@
|
|
---------------------------------------------------------------------------
|
|
|
|
-- Grab environment we need
|
|
local pairs = pairs
|
|
local client = require("awful.client")
|
|
|
|
--- Maximized and fullscreen layouts module for awful
|
|
module("awful.layout.suit.max")
|
|
|
|
local function fmax(p, fs)
|
|
-- Fullscreen?
|
|
local area
|
|
if fs then
|
|
area = p.geometry
|
|
else
|
|
area = p.workarea
|
|
end
|
|
|
|
for k, c in pairs(p.clients) do
|
|
c:geometry(area)
|
|
end
|
|
end
|
|
|
|
--- Maximized layout.
|
|
-- @param screen The screen to arrange.
|
|
name = "max"
|
|
function arrange(p)
|
|
return fmax(p, false)
|
|
end
|
|
|
|
--- Fullscreen layout.
|
|
-- @param screen The screen to arrange.
|
|
fullscreen = {}
|
|
fullscreen.name = "fullscreen"
|
|
function fullscreen.arrange(p)
|
|
return fmax(p, true)
|
|
end
|