Skip to content

Instantly share code, notes, and snippets.

@chis
Created August 22, 2021 09:10
Show Gist options
  • Save chis/68f0538228254c394089ac58038e2a70 to your computer and use it in GitHub Desktop.
Save chis/68f0538228254c394089ac58038e2a70 to your computer and use it in GitHub Desktop.
Gets a list of input devices and uses awk to grab the laptop keyboard, for me at least - sometimes this number changes, so the correct number is grepped, then xinput float disables the keyboard input. Useful if you have cats that sit on your laptop.
xinput list|grep -i "translated"|awk '{print $7 }' | xinput float $(grep -oE '[0-9]+' $7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment