From: Arnout E. <no...@bz...> - 2011-10-20 21:31:23
|
On Thu, Oct 20, 2011 at 08:44:49PM +0100, David Given wrote: > F9 asks for the workspace type. Right: choosing the 'empty' workspace layout gets you a floating ws. > I have, however, found Tiling->Untile and Context->New Tiling which convert > to and from floating mode respectively. OK > What I really want is a tiled workspace, over which windows appear > floating by default (unless the user has previously specified a rule, or > manually drops a window into a frame). Aha, yes. > Looking at the way defwinprops work, it appears as though the first > defwinprop that matches is used; that is, settings don't stack. Indeed they don't stack. I updated the 'Winprops' section of the notionconf document to better describe the matching algorithm - see http://notion.sourceforge.net/notionconf/node4.html#SECTION00450000000000000000 Documentation improvement suggestions/patches are certainly welcome :). > >> I did spend some time fiddling with mod_dock but there's no documentation > >> for that either. I think I did manage to get it to swallow a panel once > >> but it then expanded to fill 2/3 of the screen... > > I found out why this happened: the dock swallowed the top-bar (which is > one screen wide), then the gkrellm (which is 2/3 of a screen high), then > the bottom-bar (which is one screen wide). So the dock ended up being > about two screens wide and 2/3 of a screen high, with only the top-bar > visible. Jep, that sounds entirely plausible. > [...] > > The sf.net trackers, https://sourceforge.net/tracker/?group_id=314802 > > Okay, I've done that here. > > https://sourceforge.net/tracker/?func=detail&aid=3426524&group_id=314802&atid=1324531 > > I've labelled it 'EMWH compliance' because, hey, I can dream... I share your dream :). Might be good to have a seperate issue per feature though, so we can keep discussions somewhat focussed. > >> (I'm also wondering whether the defwinprop stuff is flexible enough to > >> support this without needing any core changes.) > > > > I'm not sure. > > It's not --- it can only match on class, role and instance. > > A more sophisticated matching engine would certainly be possible, but > given all this is Lua, maybe something like: > > defwinprop { > predicate = function(w) > return w._NET_WINDOW_TYPE == "_NET_WM_WINDOW_TYPE_DOCK" > end, > > floating = true -- or something > } > > ...would be possible? In fact, specifying a custom predicate is already possible, it was just not documented :(. You can override the 'match' function, for example like this: defwinprop { class = "Npviewer.bin", match = function(prop, cwin, id) return is_fullscreen(cwin) end, switchto = false, flash_fullscreen = true, } To read client window properties from lua, use ioncore.x_get_window_property (http://notion.sourceforge.net/notionconf/node7.html#fn:ioncore.x_get_window_property) and check out the atom-related functions. To get your desired behavior of having all windows float by default, I'm not sure I know of an elegant way to do that right now. Indeed having all matching winprops 'stack' their options seems like a neat idea, but it might have quite a bit of impace - we should carefully consider it. Kind regards, Arnout |