I would like to write a script to disable keyboard. I write
xinput disable 13 as built-in keyboard's id = 13.
But what if the 'id' changes somehow? Then it won't work anymore. That's why I have to write better script, the one that uses grep.
For now, I got this
xinput list|grep AT|grep id= ↳ AT Translated Set 2 keyboard id=13 [slave keyboard (3)]
cut -f 2 to my command, so it displays this > id=13
So, for now, I got 'id=13', but I need only 13, without id=, so I could assign that value to some variable, to pass it to
xinput disable $variable
Can someone help me to complete my script?