pointfichiers/bin/xtoggle-touchpad
GaspardCulis d9fd225f36 Made separate scripts for toggle-touchpad
One for wayland (specifically Hyrland), one for x11
2023-10-29 12:29:57 +01:00

12 lines
298 B
Bash
Executable file

#!/bin/bash
DEVICE_ID=$(xinput | grep Touchpad | cut -d "=" -f2 | cut -f1)
if [ $(xinput list-props $DEVICE_ID | grep "Device Enabled" | cut -d ':' -f 2 | xargs) == 1 ]; then
dunstify "Disabled touchpad"
xinput disable $DEVICE_ID
else
dunstify "Enabled touchpad"
xinput enable $DEVICE_ID
fi