[Linux] XKB Map loading tweaks

This commit is contained in:
Ivan Malison 2020-11-29 17:36:27 -08:00
parent 42a9aa1a1b
commit 994a2a2e43
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -8,4 +8,13 @@ echo "loading keymap from $XKBMAPFILE"
xkbcomp -I"$XKBDIR" "$XKBMAPFILE" "${DISPLAY%%.*}" xkbcomp -I"$XKBDIR" "$XKBMAPFILE" "${DISPLAY%%.*}"
unset XKBDIR XKBMAPFILE XKB_DEVICE_DIR="$XKBDIR/devices"
for file in "$XKB_DEVICE_DIR"/*
do
DEVICE_ID=$(xinput | grep "$(basename $file)" | head -n 1 | grep -Eo "id=[0-9]*" | grep -Eo "[0-9]*")
echo $file
echo device
echo "$DEVICE_ID"
# [ ! -z "$DEVICE_ID" ] && xkbcomp -I"$XKBDIR" -i "$DEVICE_ID" "$file" "${DISPLAY%%.*}"
done