Skip to content

Instantly share code, notes, and snippets.

@jgsqware
Created November 18, 2015 09:18
Show Gist options
  • Save jgsqware/f31dfb1772f09b952f91 to your computer and use it in GitHub Desktop.
Save jgsqware/f31dfb1772f09b952f91 to your computer and use it in GitHub Desktop.
Linux: Toggle touchpad from command-line using dconf
#!/usr/bin/env bash
if [ "$(dconf read /org/gnome/settings-daemon/peripherals/touchpad/touchpad-enabled)" == 'true' ]; then
echo "Disabling touchpad"
dconf write /org/gnome/settings-daemon/peripherals/touchpad/touchpad-enabled false;
else
echo "Enabling touchpad"
dconf write /org/gnome/settings-daemon/peripherals/touchpad/touchpad-enabled true;
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment