dotfiles/.local/bin/toggle_touchpad

11 lines
243 B
Bash
Executable File

#!/bin/sh
device=12
state=$(xinput list-props "ETPS/2 Elantech Touchpad" | grep "Device Enabled" | grep -o "[01]$")
if [ $state == '1' ];then
xinput --disable "ETPS/2 Elantech Touchpad"
else
xinput --enable "ETPS/2 Elantech Touchpad"
fi