Browse Source

Update changemouse script

add pointer binding utility to the script.
pull/2/head
Ali Hatami Tajik 2 years ago
parent
commit
50b9200b17
  1. 23
      src/scripts/python/changemouse.py

23
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. only one instance of this code is running at a moment so no conflicts occur.
""" """
import util.pointer as xup import util.pointer as putil
import util.x as com import util.x as xutil
if __name__ == "__main__": if __name__ == "__main__":
# If we didn't import the script as utility """Configure Pointers
pointers = xup.get_pointers()
# TODO filter functionality inside utilities Execution time: 200ms avg -> Tolarable
core_master = list(filter(lambda x: "Virtual core" in x.name, pointers))[0] """
v_core, touch_master, e_galax, pointers = putil.get_pointers_categorized()
for pointer in filter(lambda x: x.slave, pointers): if e_galax:
if not "eGalax" in pointer.name: xutil.reattach(e_galax.id, touch_master.id)
com.reattach(pointer.id, core_master.id) for p in pointers:
else: xutil.reattach(p.id, v_core.id)
pass

Loading…
Cancel
Save