On Mon, Jan 03, 2005 at 01:23:21PM -0500, Jordan Sissel wrote:
> What does mod_mgmtmode do? The comments in the code don't really tell me
> much, and actually reading the code tells me little more becuase I'm
> tired - maybe I missed something? ;)
It adds a management mode in which a xor border like in move/resize mode
is drawn around selected region that can be changed while in the mode.
There are no default bindings atm, and it probably needs some extra work
in other ways too (the function below is really too complex), but it is
supposed to be used something like follows (untested):
defbindings("WMgmtMode", {
kpress("Up", "_:select(_:selected():manager() or _)"),
kpress("Tab", "mgmtmode_ionws_switch(_, 'right')"),
kpress("C", "_:selected():rqclose()"),
})
function mgmtmode_ionws_switch(mode, dir)
local f=mode:selected()
if f and obj_is(f:manager(), "WIonWS") then
local nxt=f:manager():nextto(f)
-- Does not warp. TODO.
if nxt then
mode:select(nxt)
end
end
end
--
Tuomo