2019-07-17 17:41:46 +02:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
# Device id according to xinput list
|
|
|
|
device=11
|
|
|
|
state=$(xinput list-props "$device" | grep "Device Enabled" | grep -o "[01]$")
|
|
|
|
|
|
|
|
if [ "$state" == "1" ];then
|
|
|
|
xinput --disable "$device"
|
2019-07-17 18:05:28 +02:00
|
|
|
notify-send -u low "Toggled touchpad (disabled)"
|
2019-07-17 17:41:46 +02:00
|
|
|
else
|
|
|
|
xinput --enable "$device"
|
2019-07-17 18:05:28 +02:00
|
|
|
notify-send -u low "Toggled touchpad (enabled)"
|
2019-07-17 17:41:46 +02:00
|
|
|
fi
|