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.
"""
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)

Loading…
Cancel
Save