From 50b9200b1718d1587ff56f85bb276980807882a9 Mon Sep 17 00:00:00 2001 From: Ali Hatami Tajik Date: Sat, 11 Mar 2023 16:40:08 +0330 Subject: [PATCH] Update changemouse script add pointer binding utility to the script. --- src/scripts/python/changemouse.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) 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)