You are not logged in.

#1 2017-11-23 13:34:46

latgarf
Member
Registered: 2012-12-14
Posts: 32

[SOLVED] Touchpad toggle via libinput

To toggle touchpad I used the following script (according to arch wiki):

#!/bin/bash
synclient TouchpadOff=$(synclient -l | grep -c 'TouchpadOff.*=.*0')

This stopped working after xf86-input-synaptics was replaced with xf86-input-libinput. How do I toggle touchpad now?

Last edited by latgarf (2017-11-23 14:34:23)

Offline

#2 2017-11-23 14:02:00

seth
Member
Registered: 2012-09-03
Posts: 50,983

Re: [SOLVED] Touchpad toggle via libinput

"xinput disable <device>" - I'm not sure whether anything was "replaced", though - xf86-input-synaptics is unmaintained but available.

Offline

#3 2017-11-23 14:31:54

latgarf
Member
Registered: 2012-12-14
Posts: 32

Re: [SOLVED] Touchpad toggle via libinput

Thanks, Seth! I found this ubuntu help page useful, and borrowed their toggle script:

#!/bin/bash
if xinput list-props 13 | grep "Device Enabled (137):.*1" >/dev/null
then
  xinput disable 13
  notify-send -u low -i mouse "Trackpad disabled"
else
  xinput enable 13
  notify-send -u low -i mouse "Trackpad enabled"
fi

If I recall correctly, with the introduction of libinput, at install, a conflict was shown between xf86-input-synaptics and xf86-input-libinput. I chose to install libinput, hence breaking my usual way to toggle touchpad.

Offline

#4 2017-11-23 14:36:09

seth
Member
Registered: 2012-09-03
Posts: 50,983

Re: [SOLVED] Touchpad toggle via libinput

fcs: xf86-input-synaptics and xf86-input-libinput packages do not list mutual conflicts.
You should still be able to use xf86-input-synaptics (whether that's a good idea is a different matter and cannot be answered in general. Rule of thumb is to use libinput and resort to synaptics when libinput fails on you or lacks crucial features)

Offline

Board footer

Powered by FluxBB