Created
January 6, 2014 14:44
-
-
Save scottydelta/8283730 to your computer and use it in GitHub Desktop.
Python script to disable and re-enable touch-pad in Xorg to fix touchpad freeze problem in Luna Elementary.
Requires "sh" python module which can be installed using pip.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sh,json | |
for line in sh.xinput("list"): | |
if "TouchPad" in line: | |
b = line.split() | |
idno = b[5] | |
idno = idno[3:] | |
for line in sh.xinput("list-props", int(idno)): | |
if "Enabled" in line: | |
c = line.split() | |
c = c[2] | |
idnoo = c[c.find("(")+1:c.find(")")] | |
sh.xinput("set-prop",int(idno),int(idnoo),0) | |
sh.xinput("set-prop",int(idno),int(idnoo),1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment