-- arch-tag: 987642e5-11c2-4899-9859-d71755cf5a56 -- example usage: -- add_winprops("vsim",{{"vsim","Vsim"}}) function add_winprops(framename,proptable) --print("Adding winprops for: "..framename) for i,v in ipairs(proptable) do --print(i..": class: "..v[2]..", instance: "..v[1]) -- v[3] is optional and means the name if table.getn(v) == 3 then name = v[3] else name = None end defwinprop{ class = v[2], instance = v[1], name = name, target = framename } end end function show_xprops(_) local id=_:current():get_ident(); mod_query.message(_, 'frame: '.._.name(_)..', instance: '..id.instance..', class: '..id.class) end -- Taken from Jeremy Hankins function xsteve_match_class(class) local wins = ioncore.clientwin_list() local result = {} for i, win in wins do if class == win:get_ident().class then table.insert(result, win) end end return result end -- Taken from Jeremy Hankins function xsteve_run_byname(prog, name) local win = ioncore.lookup_clientwin(name) if win then win:goto() else ioncore.exec(prog) end end -- Taken from Jeremy Hankins function xsteve_run_byclass(prog, class) local win = xsteve_match_class(class)[1] if win then win:goto() else ioncore.exec(prog) end end -- print "loaded ion3_functions_xsteve.lua"