2008-11-25 17:01:06 +01:00
|
|
|
---------------------------------------------------------------------------
|
2014-05-20 12:44:21 +02:00
|
|
|
--- Maximized and fullscreen layouts module for awful
|
|
|
|
--
|
2008-11-25 17:01:06 +01:00
|
|
|
-- @author Julien Danjou <julien@danjou.info>
|
|
|
|
-- @copyright 2008 Julien Danjou
|
|
|
|
-- @release @AWESOME_VERSION@
|
2014-05-20 12:44:21 +02:00
|
|
|
-- @module awful.layout.suit.max
|
2008-11-25 17:01:06 +01:00
|
|
|
---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
-- Grab environment we need
|
|
|
|
local pairs = pairs
|
|
|
|
local client = require("awful.client")
|
|
|
|
|
2012-06-14 02:45:17 +02:00
|
|
|
local max = {}
|
2008-11-25 17:01:06 +01:00
|
|
|
|
2009-02-24 21:50:46 +01:00
|
|
|
local function fmax(p, fs)
|
2008-11-25 17:01:06 +01:00
|
|
|
-- Fullscreen?
|
|
|
|
local area
|
|
|
|
if fs then
|
2009-02-24 21:50:46 +01:00
|
|
|
area = p.geometry
|
2008-11-25 17:01:06 +01:00
|
|
|
else
|
2009-02-24 21:50:46 +01:00
|
|
|
area = p.workarea
|
2008-11-25 17:01:06 +01:00
|
|
|
end
|
|
|
|
|
2009-02-24 21:50:46 +01:00
|
|
|
for k, c in pairs(p.clients) do
|
2010-05-28 19:43:46 +02:00
|
|
|
local g = {
|
|
|
|
x = area.x,
|
|
|
|
y = area.y,
|
2015-02-15 17:25:11 +01:00
|
|
|
width = area.width,
|
|
|
|
height = area.height
|
2010-05-28 19:43:46 +02:00
|
|
|
}
|
2015-02-15 17:25:11 +01:00
|
|
|
p.geometries[c] = g
|
2008-11-25 17:01:06 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
--- Maximized layout.
|
|
|
|
-- @param screen The screen to arrange.
|
2012-06-14 02:45:17 +02:00
|
|
|
max.name = "max"
|
|
|
|
function max.arrange(p)
|
2009-02-24 21:50:46 +01:00
|
|
|
return fmax(p, false)
|
2008-11-25 17:01:06 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
--- Fullscreen layout.
|
|
|
|
-- @param screen The screen to arrange.
|
2012-06-14 02:45:17 +02:00
|
|
|
max.fullscreen = {}
|
|
|
|
max.fullscreen.name = "fullscreen"
|
|
|
|
function max.fullscreen.arrange(p)
|
2009-02-24 21:50:46 +01:00
|
|
|
return fmax(p, true)
|
2008-11-25 17:01:06 +01:00
|
|
|
end
|
2012-06-14 02:45:17 +02:00
|
|
|
|
|
|
|
return max
|