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
|
2016-12-10 02:24:22 +01:00
|
|
|
-- @module awful.layout
|
2008-11-25 17:01:06 +01:00
|
|
|
---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
-- Grab environment we need
|
|
|
|
local pairs = pairs
|
|
|
|
|
2012-06-14 02:45:17 +02:00
|
|
|
local max = {}
|
2008-11-25 17:01:06 +01:00
|
|
|
|
2016-08-14 07:34:43 +02:00
|
|
|
--- The max layout layoutbox icon.
|
|
|
|
-- @beautiful beautiful.layout_max
|
|
|
|
-- @param surface
|
|
|
|
-- @see gears.surface
|
|
|
|
|
|
|
|
--- The fullscreen layout layoutbox icon.
|
|
|
|
-- @beautiful beautiful.layout_fullscreen
|
|
|
|
-- @param surface
|
|
|
|
-- @see gears.surface
|
|
|
|
|
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
|
|
|
|
|
2016-02-07 15:24:08 +01:00
|
|
|
for _, 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.
|
2016-12-10 02:24:22 +01:00
|
|
|
-- @clientlayout awful.layout.suit.max.name
|
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.
|
2016-12-10 02:24:22 +01:00
|
|
|
-- @clientlayout awful.layout.suit.max.fullscreen
|
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
|
2015-12-12 17:42:33 +01:00
|
|
|
|
|
|
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|