Script to manage keyboard layout if typematrix is available.

This commit is contained in:
Jeremy Gardais 2017-03-22 09:43:20 +01:00
parent 9ffdc1dbff
commit de7862cd4b
1 changed files with 15 additions and 0 deletions

15
tm_keyboard.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
# Manage keyboard disposition if TypeMatrix keyboard is available.
TM_ID="1e54:2030"
TM_AVAILABLE=$(lsusb | grep -i -- "$TM_ID")
if [ "${TM_AVAILABLE}" ]; then
setxkbmap -model tm2030USB -layout fr -variant bepo
else
setxkbmap -model pc104 -layout fr -variant bepo
fi
exit 0