On 2005-11-17, David Roundy <[EMAIL PROTECTED]> wrote:
> I'm wondering if there's a mechanism by which I could save the layout of a
> workspace as lua code.  I'd like to be able to create a keybinding that
> will generate a new workspace with a particular layout.  I can see that
> .ion3/default-session--1/saved_layout.lua has the relevant information, but
> it's not in a format that's particularly easy for me to see how to
> extend...

There's no way to save the layout or obtain the layout table of a single
workspace from a script at the moment, although it would be a trivial matter
to export region_get_configuration to the Lua side. If, however, all you
want to do is create a workspace with a fixed layout that you have created
interactively but do not expect to be changing the used layout(s) often, you
can copy-paste and pass any table from the saved_layout file with the 'type'
field set to "WIonWS" directly to WMPlex.attach_new (applied on some screen,
although the same function works for attaching nested workspaces or anything
to frames too). It is also possible to load the table contained in the layout
savefile simply as follows: t=dofile('filename').

-- 
Tuomo

Reply via email to