Disable Touchpad When Typing


I often accidentally touched the touchpad while typing, which led to the unintended activation of various UI elements.

I generally dislike touchpads; they feel like a useless invention, much like touchscreens in cars.

After some searching, I found a useful utility that monitors keyboard activity and disables the touchpad while typing:

syndaemon

  syndaemon -i 1 -K -R -d -t -p /tmp/syndaemon.pid

Since I use i3, I added the following to my i3 configuration:

exec sh -c '(umask 0077; pkill syndaemon; syndaemon -t -K -i 1 -d -R -p /tmp/syndaemon-${USER}.pid)'

The call to umask restricts access to the pidfile for other users. To achieve this, I need to run sh -c with a shell snippet, as umask is a built-in command that modifies the default mask for the shell.

Now, I no longer experience any touchpad issues.