From cac0aee4ca71b7a8a64e8544d07c061f82f2b71f Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 27 Apr 2022 13:50:08 +0200 Subject: [PATCH] keyd: Update conf files to new 2.0 syntax New config syntax uses [ids] section to select which input devices are affected instead of file names, so we can have all settings (for similarly set up keyboards) in a single default config file. The file itself needs to end in `.conf` instead of the old `.cfg` and there is a slight difference in syntax between the old `C` and the new `control` for mapping the control key. That is about it. --- .../keyd/SEMITEK USB-HID Gaming Keyboard.cfg | 33 ------------------- .../system-packages/etc/keyd/default.cfg | 9 ----- ...slated Set 2 keyboard.cfg => default.conf} | 8 ++++- install.sh | 1 - 4 files changed, 7 insertions(+), 44 deletions(-) delete mode 100644 bootstrap/system-packages/etc/keyd/SEMITEK USB-HID Gaming Keyboard.cfg delete mode 100644 bootstrap/system-packages/etc/keyd/default.cfg rename bootstrap/system-packages/etc/keyd/{AT Translated Set 2 keyboard.cfg => default.conf} (92%) diff --git a/bootstrap/system-packages/etc/keyd/SEMITEK USB-HID Gaming Keyboard.cfg b/bootstrap/system-packages/etc/keyd/SEMITEK USB-HID Gaming Keyboard.cfg deleted file mode 100644 index d6287a8..0000000 --- a/bootstrap/system-packages/etc/keyd/SEMITEK USB-HID Gaming Keyboard.cfg +++ /dev/null @@ -1,33 +0,0 @@ -# Makes capslock to control/escape -# insert to paste -# right alt to enable German Umlaute (äÄöÖüÜ), -# sharp s (ß), and the Euro sign (€). -# Needs compose key to be set in xkb to work correctly: -# $ setxkbmap -option "compose:menu" - -capslock = overload(C, esc) -insert = S-insert -rightalt = layer(dia) -shift = layer(shift) -rightshift = layer(shift) - -[shift:S] - -rightalt = layer(shiftedDia) - -[dia] - -shift = layer(shiftedDia) -rightshift = layer(shiftedDia) - -a = macro(compose a ") -o = macro(compose o ") -u = macro(compose u ") -s = macro(compose s s) -e = macro(compose = e) - -[shiftedDia] - -a = macro(compose A ") -o = macro(compose O ") -u = macro(compose U ") diff --git a/bootstrap/system-packages/etc/keyd/default.cfg b/bootstrap/system-packages/etc/keyd/default.cfg deleted file mode 100644 index 373ebab..0000000 --- a/bootstrap/system-packages/etc/keyd/default.cfg +++ /dev/null @@ -1,9 +0,0 @@ -# leftshift = oneshot(S) -# leftalt = oneshot(A) -# rightalt = oneshot(G) -# rightshift = oneshot(A) -# leftmeta = oneshot(M) -# rightmeta = oneshot(M) - -capslock = overload(C, esc) -insert = S-insert diff --git a/bootstrap/system-packages/etc/keyd/AT Translated Set 2 keyboard.cfg b/bootstrap/system-packages/etc/keyd/default.conf similarity index 92% rename from bootstrap/system-packages/etc/keyd/AT Translated Set 2 keyboard.cfg rename to bootstrap/system-packages/etc/keyd/default.conf index d6287a8..bb29a5b 100644 --- a/bootstrap/system-packages/etc/keyd/AT Translated Set 2 keyboard.cfg +++ b/bootstrap/system-packages/etc/keyd/default.conf @@ -5,7 +5,13 @@ # Needs compose key to be set in xkb to work correctly: # $ setxkbmap -option "compose:menu" -capslock = overload(C, esc) +[ids] + +* + +[main] + +capslock = overload(control, esc) insert = S-insert rightalt = layer(dia) shift = layer(shift) diff --git a/install.sh b/install.sh index 39c8692..0dad27e 100755 --- a/install.sh +++ b/install.sh @@ -46,7 +46,6 @@ check_consent() { printf "%s %s " "$2" "$default_consent" read -r answer if [[ "$1" == "n" ]] && [[ "$answer" != y* ]]; then - echo first printf "%s\n" "$3" false elif [[ "$1" == "y" ]] && [[ "$answer" == n* ]]; then