#!/bin/bash # Toggle the touchpad, if there is one # Guess the touchpad name touch_name=$(xinput list --name-only | grep -i touchpad) if [ -n "$touch_name" ]; then if xinput list-props "$touch_name" | grep 'Device Enabled .*:.*1'; then xinput set-prop "$touch_name" "Device Enabled" 0 else xinput set-prop "$touch_name" "Device Enabled" 1 fi fi