Skip to content

Instantly share code, notes, and snippets.

@alyssacohen
Created April 28, 2020 00:59
Show Gist options
  • Save alyssacohen/9dd19a63ada32fb0cfe44cb36af22d4a to your computer and use it in GitHub Desktop.
Save alyssacohen/9dd19a63ada32fb0cfe44cb36af22d4a to your computer and use it in GitHub Desktop.
Script to toggle "disable touchpad when typing" under GNOME
#!/usr/bin/env bash
#
# Micro script to toggle "disable touchpad when typing" under GNOME
# (to use with some games like 0 A.D.)
#
# by Alyssa Cohen
#
DISABLE_TOUCHPAD=$(gsettings get org.gnome.desktop.peripherals.touchpad disable-while-typing)
if $DISABLE_TOUCHPAD; then
echo "Touchpad remain enabled while typing..."
gsettings set org.gnome.desktop.peripherals.touchpad disable-while-typing false
else
echo "Touchpad is disabled while typing..."
gsettings set org.gnome.desktop.peripherals.touchpad disable-while-typing true
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment