togtouchpad: refactor
This commit is contained in:
parent
2bffbf2259
commit
0aa63ce933
1 changed files with 2 additions and 2 deletions
|
@ -3,10 +3,10 @@
|
||||||
TPdevice=$(xinput | sed -nre '/TouchPad|Touchpad/s/.*id=([0-9]*).*/\1/p')
|
TPdevice=$(xinput | sed -nre '/TouchPad|Touchpad/s/.*id=([0-9]*).*/\1/p')
|
||||||
|
|
||||||
off() {
|
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() {
|
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" ] && {
|
[ "$1" = "-n" ] && {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue