Hi,

I'm having lots of fun with Ion, but I can't seem to get my keybindings working to switch between parent frames in a nested configuration.

I am using the workspace file attached, and a screenshot of this looks like: http://www.mightymouse.net/temp/gkrellShoot_11-16-03_131422.png

I'm using a wrapper in ioncore-bindings.lua that looks like:

function wrap_level(bindings)
   for i, v in ipairs(bindings) do
        if v.action=="kpress" then
            local func=v.func
            v.func=function(...)
                local reg=table.remove(arg, 1)
                reg = region_active_sub(region_screen_of(reg))
                func(reg, unpack(arg))
            end
        end
   end
   return bindings
end


parent_bindings { kpress(SECOND_MOD.."Right", WGenFrame.switch_next), kpress(SECOND_MOD.."Left", WGenFrame.switch_prev), }

genframe_bindings {
        <...snip...>
        wrap_level(parent_bindings),
        <...snip...>
}

After spending a very long time trying different code (Ion 20030814 from Gentoo does not give any errors with what I have pasted in), I can't seem to make this work... could someone please tell me where I am going wrong :)

Thanks so much,


Hussein (Newbie).


--
Hussein Jodiyawalla
mightymouse.net
-- This file was created by and is modified by Ion.

initialise_screen_id(0, {
    type = "WScreen",
    name = "WScreen",
    subs = {
        {
            type = "WIonWS",
            name = "main",
            split_tree = {
                split_dir = "horizontal",
                split_tls = 70, split_brs = 954,
                tl = {
                    type = "WIonFrame",
                    name = "gkrellm",
                    flags = 4,
                    subs = {
                        {
                            type = "WClientWin",
                            windowid = 10485762,
                            checkcode = 1,
                            switchto = true,
                        },
                    },
                },
                br = {
                    type = "WIonFrame",
                    name = "parentframe",
                    flags = 0,
                    subs = {
                        {
                            type = "WIonWS",
                            name = "Terminal",
                            split_tree = {
                                type = "WIonFrame",
                                name = "term",
                                flags = 0,
                                subs = {
                                },
                            },
                            switchto = true,
                        },
                        {
                            type = "WIonWS",
                            name = "Chat",
                            split_tree = {
                                split_dir = "horizontal",
                                split_tls = 256, split_brs = 696,
                                tl = {
                                    type = "WIonFrame",
                                    name = "gaim_main",
                                    flags = 0,
                                    subs = {
                                    },
                                },
                                br = {
                                    split_dir = "vertical",
                                    split_tls = 370, split_brs = 378,
                                    tl = {
                                        type = "WIonFrame",
                                        name = "gaim_conv",
                                        flags = 0,
                                        subs = {
                                        },
                                    },
                                    br = {
                                        type = "WIonFrame",
                                        name = "irc",
                                        flags = 0,
                                        subs = {
                                        },
                                    },
                                },
                            },
                        },
                        {
                            type = "WIonWS",
                            name = "Browse",
                            split_tree = {
                                type = "WIonFrame",
                                name = "browser",
                                flags = 0,
                                subs = {
                                },
                            },
                        },
                        {
                            type = "WIonWS",
                            name = "Mail",
                            split_tree = {
                                type = "WIonFrame",
                                name = "mail_client",
                                flags = 0,
                                subs = {
                                },
                            },
                        },
                        {
                            type = "WIonWS",
                            name = "Tunes",
                            split_tree = {
                                split_dir = "horizontal",
                                split_tls = 470, split_brs = 482,
                                tl = {
                                    split_dir = "vertical",
                                    split_tls = 320, split_brs = 428,
                                    tl = {
                                        type = "WIonFrame",
                                        name = "xmms_main",
                                        flags = 0,
                                        subs = {
                                        },
                                    },
                                    br = {
                                        type = "WIonFrame",
                                        name = "WIonFrame<1>",
                                        flags = 0,
                                        subs = {
                                        },
                                    },
                                },
                                br = {
                                    type = "WIonFrame",
                                    name = "xmms_playlist",
                                    flags = 0,
                                    subs = {
                                    },
                                },
                            },
                        },
                        {
                            type = "WIonWS",
                            name = "Aux",
                            split_tree = {
                                type = "WIonFrame",
                                name = "WIonFrame<2>",
                                flags = 0,
                                subs = {
                                },
                            },
                        },
                        {
                            type = "WFloatWS",
                            name = "Legacy",
                            managed = {
                            },
                        },
                    },
                },
            },
            switchto = true,
        },
    },
})

Reply via email to