From 5f013da92030c9742f7793d225ade2b68fb1da6a Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Mon, 16 Apr 2018 15:11:47 -0400 Subject: ErgoDox config --- bin/icd | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'bin') diff --git a/bin/icd b/bin/icd index 7e87bf5..149c7bb 100755 --- a/bin/icd +++ b/bin/icd @@ -29,9 +29,14 @@ SUN_OPTIONS="\ -option lv3:menu_switch \ -option myswap:switch_lalt_lsuper" +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" @@ -75,5 +80,19 @@ if [ "x${SUN_USB_ID}" != "x" ]; then done fi +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') + for XID in $ERG_XINPUT_ID; do + echo $XID + setxkbmap \ + -I${XKB_DIR} \ + -device ${XID} \ + ${ERG_OPTIONS} \ + -print > ${HOME}/.xkb/keymap/icd.erg + xkbcomp -I${HOME}/.xkb -i ${XID} -synch -w 10 \ + ${HOME}/.xkb/keymap/icd.erg ${DISPLAY} # 2> /dev/null + done +fi echo icd > ${HOME}/.xmonad/layout -- cgit v1.2.3