Hi all,
I've made the mistake of upgrading (just my laptop, so no work time lost)
to 3ds-20061029, and now need to repair the configuration.
I've gotten most of the work done, which was not removing the removal of a
few bindings that are no longer there, but have two major remaining issues,
and one minor.
The first is that I previously had a binding:
defbindings("WFrame-on-WIonWS", {
kpress(MOD1.."Tab", "windowcycle.cycle(_)"),
kpress("Control+Tab", "windowcycle.visible_cycle(_)");
})
which now fails because WFrame-on-WIonWS isn't a legal thing bindmap.
Any suggestions what else to try? My best guess is WFrame.tiling, but I
can't tell if that's right because of the second problem.
The second is that my windowcycle module (attached) no longer seems to
work. I've got a feeling that the WGenWS bit is bitrotted, but don't have
a clear idea how to fix it. :( I've tried testing things with warns, but
all I can tell is that whatever value "ws" is giving me, I can't use it to
dump a warning to the screen.
--
David Roundy
Dept. of Physics
Oregon State University
-- windowcycle.lua -- by David Roundy
--
-- Example usage:
--
-- dopath("windowcycle")
--
-- defbindings("WFrame-on-WIonWS", {
-- kpress(MOD1.."Tab", "windowcycle.cycle(_)"),
-- kpress("Control+Tab", "windowcycle.visible_cycle(_)");
-- })
--
-- defwinprop{ -- an example of how to make the cycle skip certain windows:
-- name = "stupid",
-- windowcycle_skip = true
-- }
local windowcycle={}
_G["windowcycle"]=windowcycle
defwinprop{
class = "XClock",
windowcycle_skip = true
}
defwinprop{
instance = "korgac",
windowcycle_skip = true
}
defwinprop{
class = "Kwalletmanager",
windowcycle_skip = true
}
local function shouldnt_be_skipped(cwin)
local p=ioncore.getwinprop(cwin)
return not (p and p.windowcycle_skip)
end
local function isalsovisible(w)
return shouldnt_be_skipped(w) and WRegion.is_mapped(w)
end
local generic_cycle
function generic_cycle(frame, isok)
local allwins = ioncore.clientwin_list()
local ws=ioncore.find_manager(frame, "WGenWS")
if not obj_is(ws, "WIonWS") then
warn("Expecting WIonWS")
return
end
local current_window = WMPlex.lcurrent(frame, 1)
foundit = 0
for _, w in pairs(allwins) do
-- mod_query.warn(frame, "is it here? "..WRegion.name(w))
if ioncore.find_manager(w, "WGenWS") == ws and isok(w) then
-- mod_query.warn(frame, "is it here?")
if foundit == 1 then
-- mod_query.warn(frame, "bazbar")
w:goto()
return
end
if w == current_window then
-- mod_query.warn(frame, "zing")
foundit = 1
end
end
end
-- Okay, the current window must be last in the list
for _, w in pairs(allwins) do
if ioncore.find_manager(w, "WGenWS") == ws and isok(w) then
w:goto()
return
end
end
end
function windowcycle.cycle(frame)
generic_cycle(frame, shouldnt_be_skipped)
end
function windowcycle.visible_cycle(frame)
generic_cycle(frame, isalsovisible)
end