Hello Tuomo!

Thanks a lot for your script!

I have one problem though: My Lua-ignorance has kept me from trying it
out!

I tried the following, I

1) put mp.lua in /etc/X11/ion
2) added 'include("mp")' to ion-bindings.lua
3) added 

   kpress(DEFAULT_MOD.."S", mark_for_attach),

to genframe_bindings in ion-bindings.lua
4) and restarted ion.


When I hit DEFAULT_MOD+S I get a square cursor which can only be made to
go away by hitting Esc. Appart from that, nothing happens.

My guess is, that mark_for_attach is not passed the current frame. Can
you please tell me how to bind mark_for_attach to a key properly?

Thanks again,
Felix


On 17:41 Fri 16 Jan     , Tuomo Valkonen wrote:
> On Fri, Jan 16, 2004 at 05:30:30PM +0200, Tuomo Valkonen wrote:
> > Oops, forgot something (no, I haven't tried the code):
> 
> And a few other things. Attached is a tested version.
> 
> -- 
> Tuomo

> local marked
> 
> function mark_for_attach(frame)
>     marked=frame
> end
> 
> local function copy(t)
>     local ct={}
>     for k, v in t do
>          ct[k]=v
>     end
>     return ct
> end
> 
> local orig_get_winprop=get_winprop
> 
> local function marked_get_winprop(cwin)
>     local props=orig_get_winprop(cwin)
>     if not marked then
>         return props
>     end
>     local newprops=copy(props or {})
>     newprops.target=marked:name()
>     marked=nil
>     return newprops
> end
> 
> get_winprop=marked_get_winprop

Reply via email to