From 4f9d3486e7bd15f6e7be4b3399151960b495e2d9 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Mon, 11 May 2015 11:04:42 -0400 Subject: ICD --- bin/icd | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'bin') 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 -- cgit v1.2.3