Hi,

I sometimes need a window maximized over both screens on my desktop. I
built the following function, which assumes a lot about the screen
setup. Anyone got ideas to make it usable on more setups?

    awful.key({ modkey,}, "w",
        function (c)
            -- This assumes all screens next to each other...
            c.fullscreen           = false
            c.maximized_horizontal = false
            c.maximized_vertical   = false
            awful.client.floating.set(c, true)
            awful.client.movetoscreen(c, 1)
            local geo = c:geometry()
            geo.x = 0
            geo.y = 0
            geo.width = 0
            geo.height = 20000
            for s = 1, screen.count() do
               geo.height = math.min(geo.height, screen[s].geometry.height)
               geo.width = geo.width + screen[s].geometry.width
            end
            c:geometry(geo)
        end)

Greetings, Tobi

-- 
GPG-Key 0xE2BEA341 - signed/encrypted mail preferred
My, oh so small, homepage: http://portfolio16.de/
http://www.fli4l.de/ - ISDN- & DSL-Router on one disk!
Registered FLI4L-User #00000003

Attachment: signature.asc
Description: Digital signature

Reply via email to