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]$")
|
|
|
|
|
2020-01-16 16:12:45 +01:00
|
|
|
if [ "$state" = "1" ];then
|
2019-07-17 17:41:46 +02:00
|
|
|
xinput --disable "$device"
|
2020-01-16 16:12:45 +01:00
|
|
|
notify-send -u low "Toggled touchpad (disabled)" \
|
|
|
|
-h string:x-canonical-private-synchronous:touchpad # Override previous one
|
2019-07-17 17:41:46 +02:00
|
|
|
else
|
|
|
|
xinput --enable "$device"
|
2020-01-16 16:12:45 +01:00
|
|
|
notify-send -u low "Toggled touchpad (enabled)" \
|
|
|
|
-h string:x-canonical-private-synchronous:touchpad # Override previous one
|
2019-07-17 17:41:46 +02:00
|
|
|
fi
|