diff options
author | Ryan Kavanagh <rak@debian.org> | 2016-03-03 21:45:03 -0500 |
---|---|---|
committer | Ryan Kavanagh <rak@debian.org> | 2016-03-11 22:56:53 -0500 |
commit | 9fc8210f682e8e24b6e3a391636ead130c20c422 (patch) | |
tree | f7a32055d8176cc18f7d96acef3b69dc792f6ad9 /bin | |
parent | Extend imapfilter (diff) |
Reintroduce SUN to bin/icd
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/icd | 30 |
1 files changed, 29 insertions, 1 deletions
@@ -18,11 +18,19 @@ LAPTOP_OPTIONS="\ KIN_OPTIONS="\ ${GLOBAL_OPTIONS} \ - -option "lv3:switch" \ + -option lv3:switch \ -option caps:swapescape" +SUN_OPTIONS="\ + ${GLOBAL_OPTIONS} \ + -geometry sun(type6) \ + -option caps:escape \ + -option myswap:switch_lalt_lsuper" + + 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 }') +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 @@ -47,4 +55,24 @@ if [ "x${KIN_USB_ID}" != "x" ]; then ${HOME}/.xkb/keymap/icd.kin ${DISPLAY} # 2> /dev/null fi +if [ "x${SUN_USB_ID}" != "x" ]; then + echo "Setting up Sun Type 6" + SUN_XINPUT_ID=$(xinput | grep ${SUN_USB_ID} | sed -e 's/.*id=\([0-9]\+\).*/\1/g') + echo ${SUN_XINPUT_ID} + for XID in $SUN_XINPUT_ID; do + echo $XID + setxkbmap \ + -I${XKB_DIR} \ + -device ${XID} \ + ${SUN_OPTIONS} \ + -print > ${HOME}/.xkb/keymap/icd.sun + #-print | sed -e 's@\(pc+icd.*\)"@\1+myswap(switch_lalt_lsuper)"@g' > ${HOME}/.xkb/keymap/icd.sun + xkbcomp -I${HOME}/.xkb -i ${XID} -synch \ + ${HOME}/.xkb/keymap/icd.sun ${DISPLAY} # 2> /dev/null + done + xkbcomp -I${HOME}/.xkb -synch \ + ${HOME}/.xkb/keymap/icd.sun ${DISPLAY} # 2> /dev/null +fi + + echo icd > ${HOME}/.xmonad/layout |