mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-12-05 13:48:21 -05:00
15 lines
458 B
Plaintext
15 lines
458 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
declare -i ID
|
||
|
ID=`xinput list | grep -Eio '(touchpad|glidepoint)\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'`
|
||
|
declare -i STATE
|
||
|
STATE=`xinput list-props $ID|grep 'Device Enabled'|awk '{print $4}'`
|
||
|
if [ $STATE -eq 1 ]
|
||
|
then
|
||
|
xinput disable $ID
|
||
|
notify-send -a 'Touchpad' 'Touchpad disabled' -i $HOME/.config/dunst/notrackpad.png
|
||
|
else
|
||
|
xinput enable $ID
|
||
|
notify-send -a 'Touchpad' 'Touchpad enabled' -i $HOME/.config/dunst/trackpad.png
|
||
|
fi
|