This answer is largely based on the answer by grisotto which works but doesn't survive reboots on my machine.
This almost automates the process:
Get your pointer device name:
$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ VirtualBox mouse integration id=9 [slave pointer (2)]
⎜ ↳ ImExPS/2 BYD TouchPad id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Sleep Button id=7 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=10 [slave keyboard (3)]
In my case it's ImExPS/2 BYD TouchPad
although it's a mouse. Next get the property id of libinput Natural Scrolling Enabled
:
$ xinput list-props 11 # use the id or the name of the pointer device
Device 'ImExPS/2 BYD TouchPad':
Device Enabled (119): 1
Coordinate Transformation Matrix (121): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Accel Speed (271): 0.000000
libinput Accel Speed Default (272): 0.000000
libinput Accel Profiles Available (273): 1, 1
libinput Accel Profile Enabled (274): 1, 0
libinput Accel Profile Enabled Default (275): 1, 0
libinput Natural Scrolling Enabled (261): 0
libinput Natural Scrolling Enabled Default (262): 0
libinput Send Events Modes Available (241): 1, 0
[snip]
Here it's 261
. Now use your pointer device name (as the id might change on reboots) and property id (stays the same) and put these lines in your ~/.bashrc
. In my case it's:
device=$(xinput list --id-only 'ImExPS/2 BYD TouchPad')
xinput set-prop $device 261 0
I still have to open and close a terminal on each boot as my .bashrc
is not read on boot and it doesn't work in .profile
but that's just three clicks.