|
|
@ -8,8 +8,13 @@ are the rules: |
|
|
|
system |
|
|
|
+ Touchpanel should be connected to the master "touch-pointer" |
|
|
|
|
|
|
|
NOTE: if master `touch` is not present in the system, |
|
|
|
|
|
|
|
NOTE: if master `touch` is not present in the system, the script will create a |
|
|
|
master `touch` itself and hides the pointer. eGalax device input will be |
|
|
|
attached to this master. TODO: make master's cursor invisible. |
|
|
|
|
|
|
|
Currently we'll use xinput command-line application, but, It is possible |
|
|
|
to write a specified c program that uses Xlib efficiently. |
|
|
|
|
|
|
|
Steps: |
|
|
|
+ List all pointer as we don't know what pointer is added to the system |
|
|
|
+ group them by their usage by name rules (As if the pointer is eGalax |
|
|
@ -23,14 +28,15 @@ 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 xutil.pointer as xup |
|
|
|
import xutil.common as com |
|
|
|
import util.pointer as xup |
|
|
|
import util.common as com |
|
|
|
|
|
|
|
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) |
|
|
|