You are not logged in.
Pages: 1
I hope this is the right place to post this question. I have a problem with Synapsis touchpad. I am using i3wm and in config file I have this line
exec xinput set-prop 11 275 1this enables tapping on my touchpad after boot.
Now the problem:
when i boot my laptop with USB mouse plugged in, this line of code does not work. The reason behind it is that my synapsis touchpad id is not 11 any more but it is 12 so the code that should execute is:
exec xinput set-prop 12 293 1could anyone suggest a clever way to do this? What I'm thinking is along the lines of
if (USB mouse plugged in) exec xinput set-prop 12 293 1 else exec xinput set-prop 11 275 1except I don't quite know how to write this code in i3wm config file.
Any help is much appreciated.
Last edited by uchajk (2018-06-03 22:24:31)
Offline
Very hackish:
xinput set-prop $(xinput | grep Synaptics | cut -d\= -f2 | cut -f1) 275 1 But, this does not address the changing of 275 to 293. What is the point of that?
Edit: Where this my machine, I would probably implement this as an awk script. But, I have to relearn awk every time I use it.
Last edited by ewaller (2018-06-03 17:52:50)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Very hackish:
xinput set-prop $(xinput | grep Synaptics | cut -d\= -f2 | cut -f1) 275 1But, this does not address the changing of 275 to 293. What is the point of that?
Edit: Where this my machine, I would probably implement this as an awk script. But, I have to relearn awk every time I use it.
Edit2:
except I don't quite know how to write this code in i3wm config file.
I would put it in your xinitrc.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Very hackish:
xinput set-prop $(xinput | grep Synaptics | cut -d\= -f2 | cut -f1) 275 1But, this does not address the changing of 275 to 293. What is the point of that?
Edit: Where this my machine, I would probably implement this as an awk script. But, I have to relearn awk every time I use it.
Indeed that's a great solution. I did not know about cut command, gonna read man page about that.
And there is no point. For some reason "enable tapping" option id changes as well when booting with usb mouse plugged in. Presumably that is the result of 18 USB mouse options added before "enable tapping".
Regardless, I could do the same for Tapping:
xinput set-prop $(xinput | grep Synaptics | cut -d\= -f2 | cut -f1) $(xinput list-props $(xinput | grep Synaptics | cut -d\= -f2 | cut -f1) | grep -m 1 Tapping\ Enabled | cut -b 28,29,30) 1Side Note:
I Do think this is a cool solution but I just realized I could simply type out the actual name of device and option in plain english like so:
xinput set-prop SynPS/2\ Synaptics\ TouchPad libinput\ Tapping\ Enabled 1Last edited by uchajk (2018-06-03 20:57:09)
Offline
Pages: 1