You are not logged in.

#1 2021-11-08 15:19:10

u0
Member
Registered: 2021-07-07
Posts: 20

Script to disable mouse touchpad

I want mouse or touchpad to be activated by key kombination and automatically disable it after timeout.

I have script activated by key combination:

#!/bin/sh
xinput --enable 9
sleep 20
xinput --disable 9

But device ID changes sometimes after reboot.


xinput -list
⎜   ↳ Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]
⎜   ↳ Synaptics TM3336-001                        id=10    [slave  pointer  (2)]
⎣ Virtual core keyboard                       id=3    [master keyboard (2)]


There could be few solutions:

1) disable device by name.
What would be device name if it is possible.
2) assign id to variable and use it in script

Get output from unclutter when it hides mouse and connect it to script. Or modify source code.

Last edited by u0 (2021-11-08 15:20:35)

Offline

#2 2021-11-08 15:22:38

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,496
Website

Re: Script to disable mouse touchpad

Use the name.

u0 wrote:

What would be device name if it is possible.

It's right there in the xinput list output you provided: "Synaptics TM3336-001".


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB