Manage Dell laptop keymap
This commit is contained in:
parent
69ca9e2528
commit
17542f36d4
26
keyboard.sh
26
keyboard.sh
|
@ -1,9 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Manage keyboard disposition if TypeMatrix keyboard is available.
|
||||
|
||||
# Manage keyboard disposition for TypeMatrix if keyboard is available.
|
||||
TM_ID="1e54:2030"
|
||||
|
||||
TM_AVAILABLE=$(lsusb | grep -i -- "$TM_ID")
|
||||
|
||||
if [ "${TM_AVAILABLE}" ]; then
|
||||
|
@ -11,6 +9,24 @@ if [ "${TM_AVAILABLE}" ]; then
|
|||
&& exit 0
|
||||
fi
|
||||
|
||||
setxkbmap -model latitude -layout fr -variant bepo
|
||||
# Manage keyboard disposition for Dell if it's a Dell
|
||||
IS_DELL=$(lsusb | grep -i -- "dell")
|
||||
IS_LAPTOP=$(grep -qE "^10" /sys/devices/virtual/dmi/id/chassis_type)
|
||||
if [ "${IS_DELL}" ]; then
|
||||
# Manage keyboard disposition for Dell laptop if it's a laptop
|
||||
if [ "${IS_LAPTOP}" ]; then
|
||||
setxkbmap -model latitude -layout fr -variant bepo \
|
||||
&& exit 0
|
||||
else
|
||||
# Default Dell map to pc104 and bepo
|
||||
setxkbmap -model pc104 -layout fr -variant bepo \
|
||||
&& exit 0
|
||||
fi
|
||||
else
|
||||
# Default map to pc104 and bepo
|
||||
setxkbmap -model pc104 -layout fr -variant bepo \
|
||||
&& exit 0
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
exit 255
|
||||
|
|
Loading…
Reference in New Issue