diff options
| author | Ryan Kavanagh <rak@rak.ac> | 2021-12-17 09:48:56 -0500 | 
|---|---|---|
| committer | Ryan Kavanagh <rak@rak.ac> | 2021-12-17 09:48:56 -0500 | 
| commit | c084ab11f5f649dd8f564152e336e2aae9cd09a4 (patch) | |
| tree | 3e970964bae02408dc6ecc192dcc2b9eb1671f29 /bin | |
| parent | bump default font size to 10 (diff) | |
make icd portable
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/executable_icd | 18 | 
1 files changed, 14 insertions, 4 deletions
| diff --git a/bin/executable_icd b/bin/executable_icd index e419b7f..367b87f 100755 --- a/bin/executable_icd +++ b/bin/executable_icd @@ -33,10 +33,20 @@ ERG_OPTIONS="\      -option lv3:switch \      -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 }') + +case `uname` in +    OpenBSD) +        LAPTOP_ID=$(xinput | grep "/dev/wskbd" | sed -e 's/.*id=\([0-9]\+\).*/\1/g') +        ;; +    Linux) +        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 }') +        ;; +    *) +        ;; +esac  echo "Setting up laptop"  setxkbmap ${LAPTOP_OPTIONS} -device ${LAPTOP_ID} -print > ${XKB_DIR}/keymap/icd.laptop | 
