1
0
Fork 0

togtouchpad: refactor

This commit is contained in:
Luca Bilke 2025-01-08 16:22:30 +01:00
parent 2bffbf2259
commit 0aa63ce933
Signed by: luca
GPG key ID: F6E11C9BAA7C82F5

View file

@ -3,10 +3,10 @@
TPdevice=$(xinput | sed -nre '/TouchPad|Touchpad/s/.*id=([0-9]*).*/\1/p')
off() {
xinput disable "$TPdevice" && notify-send -h string:x-dunst-stack-tag:"togtp" "Touchpad Disabled" -i input-touchpad-off
xinput disable "$TPdevice" && notify-send -h string:x-dunst-stack-tag:"togtouchpad" "Touchpad Disabled" -i input-touchpad-off
}
on() {
xinput enable "$TPdevice" && notify-send -h string:x-dunst-stack-tag:"togtp" "Touchpad Enabled" -i input-touchpad-on
xinput enable "$TPdevice" && notify-send -h string:x-dunst-stack-tag:"togtouchpad" "Touchpad Enabled" -i input-touchpad-on
}
[ "$1" = "-n" ] && {