Created
May 6, 2021 18:21
-
-
Save tkanarsky/c909c3d763442e81f400779a5a704618 to your computer and use it in GitHub Desktop.
Keyboard cleaning script -- disables keyboard for some number of seconds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
xinput --list | |
echo "Enter keyboard id:" | |
read kb | |
echo "Enter time to disable keyboard (sec):" | |
read sec | |
xinput set-prop $kb "Device Enabled" 0; | |
for i in $(seq $sec -1 1); do | |
sleep 1; | |
echo $i; | |
done | |
xinput set-prop $kb "Device Enabled" 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment