On Sat, 13 Mar 2004, Clark C. Evans wrote:

> I've got one question for now... how do I ALT-TAB through every window
> in a workspace?

By window, I assume you mean frame.  Anyway, I use the following to cycle
through all my frames.  It tries to go down first, then if there's
nothing below the frame, it goes to the top of whatever is to the right.
If there's nothing to the right, it jumps to the top left.

I hope that helps,
Tony

    kpress(ALT_MOD .. "Tab",
        function(ws)
            local frames = WIonWS.managed_list(ws)
            local cur = WIonWS.current(ws)

            -- try down
            if WIonWS.below(ws, cur) then
                WIonWS.goto_below(ws)
            else
                -- try right
                if WIonWS.right_of(ws, cur) then
                    local target = WIonWS.right_of(ws, cur)
                    while WIonWS.above(ws, target) do
                        target = WIonWS.above(ws, target)
                    end
                    WRegion.goto(target)
                else
                    -- start over
                    local target = WIonWS.leftmost(ws)
                    while WIonWS.above(ws, target) do
                        target = WIonWS.above(ws, target)
                    end
                    WRegion.goto(target)
                end
            end
        end),


-- 
Tony Chang
http://www.aypwip.org

"I'm a bigger idiot than anyone I know . . ."
--Sorry Song by The Gamits

Reply via email to