On Sun, Dec 5, 2010 at 3:27 PM, Vitor Eiji Justus Sakaguti
<[email protected]> wrote:
> They will not behave well if you have more than one tag selected, I'll
> fix that soon, but it's a start.

OK, new version, will work with any number of tags selected.
Please notice that only floating unmaximized non-fullscreen clients
will be moved and this is intentional (it just makes sense to me, you
can tweak it at will).

------------------------------------------------

    awful.key({ modkey,           }, "a",
        function ()
            local allclients = client.get(mouse.screen)
            for _,c in ipairs(allclients) do
                if i(floats(c) and c:isvisible()
                    and (not c.maximized_horizontal)
                    and (not c.minimized)
                    and (not c.fullscreen)) then
                    local g = c:geometry()
                    local sg = screen[c.screen].geometry
                    g.x = g.x + sg.width
                    c:geometry(g)
                end
            end
        end),

    awful.key({ modkey,           }, "d",
        function ()
            local allclients = client.get(mouse.screen)
            for _,c in ipairs(allclients) do
                if i(floats(c) and c:isvisible()
                    and (not c.maximized_horizontal)
                    and (not c.minimized)
                    and (not c.fullscreen)) then
                    local g = c:geometry()
                    local sg = screen[c.screen].geometry
                    g.x = g.x - sg.width
                    c:geometry(g)
                end
            end
        end),

    awful.key({ modkey, "Shift"   }, "s",
        function ()
            local allclients = client.get(mouse.screen)
            for _,c in ipairs(allclients) do
                if i(floats(c) and c:isvisible()
                    and (not c.maximized_vertical)
                    and (not c.minimized)
                    and (not c.fullscreen)) then
                    local g = c:geometry()
                    local sg = screen[c.screen].geometry
                    g.y = g.y + sg.height
                    c:geometry(g)
                end
            end
        end),

    awful.key({ modkey,           }, "s",
        function ()
            local allclients = client.get(mouse.screen)
            for _,c in ipairs(allclients) do
                if i(floats(c) and c:isvisible()
                    and (not c.maximized_vertical)
                    and (not c.minimized)
                    and (not c.fullscreen)) then
                    local g = c:geometry()
                    local sg = screen[c.screen].geometry
                    g.y = g.y - sg.height
                    c:geometry(g)
                end
            end
        end),
------------------------------------------------

Maybe it would be a good idea to add a way to restore the original
geometries of all clients, but that I leave to you to implement :)

Cheers

-- 
To unsubscribe, send mail to [email protected].

Reply via email to