diff --git a/src/scripts/python/changemouse.py b/src/scripts/python/changemouse.py index f10447d..3faa813 100644 --- a/src/scripts/python/changemouse.py +++ b/src/scripts/python/changemouse.py @@ -28,17 +28,16 @@ NOTE: In case of psyco adds and removes mouses with intervals smaller than run only one instance of this code is running at a moment so no conflicts occur. """ -import util.pointer as xup -import util.x as com +import util.pointer as putil +import util.x as xutil if __name__ == "__main__": - # If we didn't import the script as utility - pointers = xup.get_pointers() - # TODO filter functionality inside utilities - core_master = list(filter(lambda x: "Virtual core" in x.name, pointers))[0] - - for pointer in filter(lambda x: x.slave, pointers): - if not "eGalax" in pointer.name: - com.reattach(pointer.id, core_master.id) - else: - pass + """Configure Pointers + + Execution time: 200ms avg -> Tolarable + """ + v_core, touch_master, e_galax, pointers = putil.get_pointers_categorized() + if e_galax: + xutil.reattach(e_galax.id, touch_master.id) + for p in pointers: + xutil.reattach(p.id, v_core.id)