Keyitdev / dotfiles

My personal build of dotfiles using i3.
GNU General Public License v3.0
387 stars 40 forks source link

ctrl + f9 shortcut doesn't always disable the touchpad #14

Closed alphaprads closed 1 year ago

alphaprads commented 1 year ago

what is happening is i have to set my device id by going in i3 config instead of the number 15 and then it seems that the touchpad works but finding the device id requires a decent knowledge of what xinput is and how xorg works

similarly we can also do the same for Ctrl + F10

alphaprads commented 1 year ago

i would like to work on this issue i have already solved it so it's just a pull request away

Keyitdev commented 1 year ago

xinput list | grep -oP 'Touchpad.*id=\K\d+'
It's simpler solution than xinput list | grep Touchpad | awk -F "id=" '{print $2}' | awk '{print $1}' (I think). Can you try it and say if it works?

alphaprads commented 1 year ago

oh you're actually right i made the following changes to the config and it works really well i knew what i was doing was probably too long and there would be a bettery way of doing it but just wasn't sure if this was right

i also had to ask rather than making only touchpad stop we can also make all slave devices that control pointer if this could be done that means it's effectively stopping the cursor movement totally i don't know why this is just restricted to touchpad and not mouse/other peripheral devices that can possibly control

Keyitdev commented 1 year ago

i don't know why this is just restricted to touchpad and not mouse/other peripheral devices that can possibly control

Mostly because you can't physically disconnect touchpad. If you are using mouse, you can just unplug it.

alphaprads commented 1 year ago

oh that makes sense.

Keyitdev commented 1 year ago

@alphaprads I added xinput list | grep -oP 'Touchpad.*id=\K\d+' to i3 config. And also better comments to polybar. Now ctrl + f9/f10 shortcut always disable/enable the touchpad. Thanks for idea.