This repository has been archived on 2021-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
2020-05-27 02:31:42 +00:00
|
|
|
#!/bin/sh
|
2017-02-20 23:43:43 +00:00
|
|
|
#
|
|
|
|
# enable/disable touchpad
|
|
|
|
# find your touchpad name:
|
|
|
|
# egrep -i 'synap|alps|etps' /proc/bus/input/devices
|
2017-02-23 03:30:07 +00:00
|
|
|
#
|
|
|
|
# Source: Xero's dotfiles on github
|
|
|
|
|
2017-02-20 23:43:43 +00:00
|
|
|
PAD='AlpsPS/2 ALPS GlidePoint'
|
2020-05-27 02:31:42 +00:00
|
|
|
A=$(xinput list-props "$PAD" | sed -n -e 's/.*Device Enabled ([0-9][0-9]*):\t\(.*\)/\1/p' )
|
|
|
|
if [ "$A" -eq 1 ]; then
|
2017-02-23 03:30:07 +00:00
|
|
|
xinput set-int-prop "$PAD" "Device Enabled" 8 0
|
2018-03-01 04:34:41 +00:00
|
|
|
notify-send -t 5000 'touchpad disabled' -i /usr/share/icons/Papirus-Dark/24x24/devices/input-touchpad.svg
|
2017-02-20 23:43:43 +00:00
|
|
|
else
|
2017-02-23 03:30:07 +00:00
|
|
|
xinput set-int-prop "$PAD" "Device Enabled" 8 1
|
2018-03-01 04:34:41 +00:00
|
|
|
notify-send -t 5000 'touchpad enabled' -i /usr/share/icons/Papirus-Dark/24x24/devices/input-touchpad.svg
|
2017-02-20 23:43:43 +00:00
|
|
|
fi
|