Created
June 2, 2016 20:09
-
-
Save jamespo/b74f59ed86b381ca45928e6c125fd464 to your computer and use it in GitHub Desktop.
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 | |
# synclient-to-x.py - export synclient -l output to | |
# x.org config file [c] jamespo [at] gmail [dot] com | |
# USAGE: synclient -l | ./synclient-to-x.py > 50-synaptics.conf | |
from __future__ import print_function | |
import fileinput | |
print(""" | |
Section "InputClass" | |
Identifier "touchpad" | |
Driver "synaptics" | |
MatchIsTouchpad "on" """) | |
for line in fileinput.input(): | |
fields = line.strip().split('=') | |
try: | |
print(' "%s" "%s"' % | |
(fields[0].strip(), fields[1].strip())) | |
except IndexError: | |
pass | |
print('EndSection') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment