mirror of
https://gitlab.com/mlunax/dotfiles.git
synced 2025-04-12 05:40:17 +00:00
12 lines
330 B
Bash
Executable file
12 lines
330 B
Bash
Executable file
#!/bin/bash
|
|
fileName=/tmp/touchpad
|
|
id=$(xinput | grep TouchPad |grep -Poh '(?<=id\=)[0-9]+')
|
|
if [[ ! -f $fileName ]]; then
|
|
echo "$id" > $fileName
|
|
xinput --disable $id
|
|
notify-send "Touchpad disabled" -t 1000 -u low
|
|
else
|
|
xinput --enable $(cat $fileName)
|
|
rm $fileName
|
|
notify-send "Touchpad enabled" -t 1000 -u low
|
|
fi
|