Hacker News new | ask | show | jobs
by bananicorn 2242 days ago
I have these settings in my .xinitrc on my ThinkPad T420, but never had to do anything terribly arcane to get it to work as I expect it to.

    exec xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Tap Action' 1 1 1 1 1 1 1 &
    exec xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Two-Finger Scrolling' 1 1 &
    exec xinput set-prop 'TPPS/2 IBM TrackPoint' 'libinput Accel Speed' -.3 &
    exec xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Coasting Speed' 0 0 &

Sure, it could be more fine-tuned, but it works just fine that way.

On other laptops I've had to reduce the "finger size" (I can't remember the name of the setting), so I could use it even with a light touch, but that's the biggest problem I've had with it so far.

1 comments

Are you actually using exec before each xinput command? If so, only your first xinput command actually gets run. exec replaces the currently running process, effectively making it run-this-and-exit.
Looks like & saves the day by invoking the command in a subshell and then in that subshell exec replaces the subshell with the xinput command. E.g. you can test it by

    $ cat ./a.sh 
    #!/bin/sh
    exec /bin/echo foo &
    exec /bin/echo bar &
which outputs foo and bar. Seems like a special case, just like exec without a command for file descriptor redirection.
That's rather interesting - it does work, I can tell you that much, but maybe there's a more standard way of doing this :)