From de7862cd4b1c92dff25eb4d2272643532c10572f Mon Sep 17 00:00:00 2001 From: Gardouille Date: Wed, 22 Mar 2017 09:43:20 +0100 Subject: [PATCH] Script to manage keyboard layout if typematrix is available. --- tm_keyboard.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 tm_keyboard.sh diff --git a/tm_keyboard.sh b/tm_keyboard.sh new file mode 100755 index 0000000..eff1ef3 --- /dev/null +++ b/tm_keyboard.sh @@ -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