From e9a78b9cb9550d65a5693302265e5feb1b2762ec Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Mon, 14 May 2018 16:05:09 -0400 Subject: Added ergodox config to icd --- bin/icd | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'bin/icd') diff --git a/bin/icd b/bin/icd index 2949502..86a01c1 100755 --- a/bin/icd +++ b/bin/icd @@ -34,16 +34,14 @@ ERG_OPTIONS="\ ${GLOBAL_OPTIONS} \ -option caps:escape" - LAPTOP_ID=$(xinput | grep "AT Translated Set 2 keyboard" | sed -e 's/.*id=\([0-9]\+\).*/\1/g') KIN_USB_ID=$(lsusb | grep -i "Kinesis Advantage Pro" | awk '{ print $6 }') ERG_USB_ID=$(lsusb | grep -i "feed:1307" | awk '{ print $6 }') SUN_USB_ID=$(lsusb | grep -i "Sun Microsystems, Inc. Type 6 Keyboard" | awk '{ print $6 }') -echo "Setting up laptop" setxkbmap ${LAPTOP_OPTIONS} -device ${LAPTOP_ID} -print > ${XKB_DIR}/keymap/icd.laptop -#xkbcomp -I${HOME}/.xkb -i ${LAPTOP_ID} -synch \ -xkbcomp -I${HOME}/.xkb -synch \ +#xkbcomp -I${HOME}/.xkb -synch \ +xkbcomp -I${HOME}/.xkb -i ${LAPTOP_ID} -synch \ ${HOME}/.xkb/keymap/icd.laptop $DISPLAY # 2> /dev/null if [ "x${KIN_USB_ID}" != "x" ]; then @@ -83,9 +81,11 @@ if [ "x${SUN_USB_ID}" != "x" ]; then done fi +echo ${ERG_USB_ID} if [ "x${ERG_USB_ID}" != "x" ]; then - echo "Setting up ErgoDox" - ERG_XINPUT_ID=$(xinput | grep "ErgoDox EZ" | grep keyboard | sed 's/.*id=\([0-9]\+\).*/\1/g') + echo "Setting up ergodox" + ERG_XINPUT_ID=$(xinput | grep "ErgoDox EZ" | sed -e 's/.*id=\([0-9]\+\).*/\1/g') + echo "ID: ${ERG_XINPUT_ID}" for XID in $ERG_XINPUT_ID; do echo $XID setxkbmap \ @@ -93,9 +93,10 @@ if [ "x${ERG_USB_ID}" != "x" ]; then -device ${XID} \ ${ERG_OPTIONS} \ -print > ${HOME}/.xkb/keymap/icd.erg - xkbcomp -I${HOME}/.xkb -i ${XID} -synch -w 10 \ + xkbcomp -I${HOME}/.xkb -i ${XID} -synch \ ${HOME}/.xkb/keymap/icd.erg ${DISPLAY} # 2> /dev/null done fi + echo icd > ${HOME}/.xmonad/layout -- cgit v1.2.3