aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@debian.org>2015-05-11 11:04:42 -0400
committerRyan Kavanagh <rak@debian.org>2015-05-11 11:04:42 -0400
commit4f9d3486e7bd15f6e7be4b3399151960b495e2d9 (patch)
tree0976fb11155ba65bd0379dd7a079a81281460e3f
parentRemove dpr script (diff)
ICD
Diffstat (limited to '')
-rwxr-xr-xbin/icd9
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/icd b/bin/icd
index fec5d5f..c0ca3d4 100755
--- a/bin/icd
+++ b/bin/icd
@@ -13,11 +13,17 @@ OPTIONS="\
-option lv3:ralt_switch_multikey \
-option ctrl:swapcaps"
+[ -d ${HOME}/.xkb/keymap ] || mkdir -p ${HOME}/.xkb/keymap
+
setxkbmap ${OPTIONS} -print > ${HOME}/.xkb/keymap/icd
+LAPTOP_ID=$(xinput | grep "AT Translated Set 2 keyboard" | sed -e 's/.*id=\([0-9]\+\).*/\1/g')
SUN_USB_ID=$(lsusb | grep Sun | awk '{ print $6 }')
KIN_USB_ID=$(lsusb | grep -i "Kinesis Advantage Pro" | awk '{ print $6 }')
+xkbcomp -i $(LAPTOP_ID) -I${HOME}/.xkb \
+ /home/ryan/.xkb/keymap/icd $DISPLAY # 2> /dev/null
+
if [ "x${SUN_USB_ID}" != "x" ]; then
SUN_XINPUT_ID=$(xinput | grep ${SUN_USB_ID} | sed -e 's/.*id=\([0-9]\+\).*/\1/g')
setxkbmap \
@@ -54,9 +60,6 @@ elif [ "x${KIN_USB_ID}" != "x" ]; then
done
xkbcomp -I${HOME}/.xkb \
${HOME}/.xkb/keymap/icd.kin ${DISPLAY} # 2> /dev/null
-else
- xkbcomp -I/home/ryan/.xkb \
- /home/ryan/.xkb/keymap/icd $DISPLAY # 2> /dev/null
fi
echo icd > /home/ryan/.xmonad/layout