Sim, é possível. Primeiro você precisa identificar o seu touchpad. Execute xinput list
(talvez você tenha que instalar xinput
com sudo apt install xinput
primeiro). No meu sistema, isso mostra:
$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ TPPS/2 IBM TrackPoint id=16 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver id=12 [slave pointer (2)]
⎜ ↳ Logitech M325 id=10 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=15 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Sleep Button id=9 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Integrated Camera id=13 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Logitech USB Receiver id=18 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=14 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
↳ ThinkPad Extra Buttons id=17 [slave keyboard (3)]
Então, meu touchpad é chamado de SynPS/2 Synaptics TouchPad
. Descubra o nome do seu e modifique este script de acordo:
#!/bin/bash
## Change this value to whatever your touchpad is called
touchpad='SynPS/2 Synaptics TouchPad'
status=$(xinput list-props "$touchpad" | grep "Device Enabled" | gawk '{print $NF}');
if (( $status==1 )); then
xinput -set-int-prop "$touchpad" "Device Enabled" 8 0
else
xinput -set-int-prop "$touchpad" "Device Enabled" 8 1
fi
Salve esse script como ~/bin/toggle_touchpad.sh
e use a GUI do ambiente de área de trabalho para atribuir um atalho a ele. O atalho agora executará o script e alternará o touchpad conforme desejado.