dgy
/
hexagons
Archived
1
0
Fork 0
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.
hexagons/.local/bin/touchpad

18 lines
634 B
Bash
Executable File

#!/bin/bash
#
# enable/disable touchpad
# find your touchpad name:
# egrep -i 'synap|alps|etps' /proc/bus/input/devices
#
# Source: Xero's dotfiles on github
PAD='AlpsPS/2 ALPS GlidePoint'
A=`xinput list-props "$PAD" | sed -n -e 's/.*Device Enabled ([0-9][0-9]*):\t\(.*\)/\1/p' `
if [ $A -eq 1 ]; then
xinput set-int-prop "$PAD" "Device Enabled" 8 0
notify-send -t 5000 'touchpad disabled' -i /usr/share/icons/Papirus-Dark/24x24/devices/input-touchpad.svg
else
xinput set-int-prop "$PAD" "Device Enabled" 8 1
notify-send -t 5000 'touchpad enabled' -i /usr/share/icons/Papirus-Dark/24x24/devices/input-touchpad.svg
fi