Tuomo Valkonen <[EMAIL PROTECTED]> wrote:
> On Thu, Jul 03, 2003 at 03:25:17AM +0200, Toke N-S wrote:
> > Also how do you then direct
> > keypresses to a specific level in this hierarchy? 
> 
> You must do the level selection in your binding functions.
> 
> You could do this with wrappers like:
> 
Thanks, I got it to work with this wrapper based on yours:

function level1(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

Also similarly for "level2" and "level3"


I have created a setup which uses this functionality very much.
This is the region setup I have made:
(I hope this is of any interest; I believe that it is sufficiently
different from a normal setup to be worth metioning; please tell me
if I'm wrong.)

I started by making only one WIonWS. Then I split this ws into a main
frame and some other frames I wanted for my status applications
(docks(?)). Then instead of attaching clients directly to the main
frame I attached the workspaces I usually use. In this way I can shift
between workspaces while having e.g. a statusbar shown at all
times. When I disable tabs, the workspaces come to look as usual
(except for maybe the border; can the border be disabled for a single
frame/ws?). This setup actually gives me more freedom as I can decide
whether or not I want tabs for the workspaces or not. Also imo this
setup gives more consistency to ion, as workspaces are then handled by
the same functions and in the same way as client windows (in terms of
moving between them and positioning them in whatever sequence).

When this setup is used, and e.g. the statusbar is assigned to it's
frame via a kludge, it would actually be nice to be able to set an
option to this frame that it should never receive focus.

To illustrate my idea I have attached a sample (partly handcrafted)
workspaces file. Btw, I think it would be nicer if ion used two
workspaces files: one you could edit which ion never wrote to, and one
which ion wrote to to save the current setup (as the one now).

I still have one problem which is to have the clients started when
ion is started (in my xinitrc) to go by default to at specific
workspace ("general" in the case of my setup). I don't know how to
make a kludge which only apply to these automatically started
programs. Maybe an option could be set that the topmost workspace
should never manage clientwins?


Toke N-S

Attachment: workspaces.lua.backup
Description: Binary data

Reply via email to