RPi-Distro / pi-gen

Tool used to create the official Raspberry Pi OS images
BSD 3-Clause "New" or "Revised" License
2.59k stars 1.62k forks source link

keyboard settings are not working #794

Open CvH opened 4 days ago

CvH commented 4 days ago

It looks like the keyboard settings are properly set during image creation but are not actually used from wayfire.

debconf-show keyboard-configuration shows me the proper configuration but the settings are missing at the wayfire.ini .

my pi-gen config

KEYBOARD_KEYMAP=de
KEYBOARD_LAYOUT=Deutsch
FIRST_USER_NAME=admin
FIRST_USER_PASS=1234
DISABLE_FIRST_BOOT_USER_RENAME=1

debconf-show keyboard-configuration

* keyboard-configuration/xkb-keymap: de
  keyboard-configuration/modelcode: pc105
  keyboard-configuration/toggle: No toggling
* keyboard-configuration/optionscode:
  keyboard-configuration/switch: No temporary switch
  keyboard-configuration/store_defaults_in_debconf_db: true
* keyboard-configuration/compose: No compose key
  keyboard-configuration/unsupported_config_options: true
  keyboard-configuration/unsupported_options: true
  keyboard-configuration/layout:
  keyboard-configuration/unsupported_config_layout: true
* keyboard-configuration/model: Generische PC-Tastatur mit 105 Tasten
  keyboard-configuration/variantcode:
  keyboard-configuration/unsupported_layout: true
  debian-installer/console-setup-udeb/title:
* keyboard-configuration/altgr: The default for the keyboard layout
* keyboard-configuration/ctrl_alt_bksp: false
  keyboard-configuration/layoutcode: de
  keyboard-configuration/other:
* keyboard-configuration/variant: Deutsch

/home/$user/.config/wayfire.ini

...
[input]
xkb_model = pc105
xkb_layout = gb
xkb_variant =
CvH commented 4 days ago

static workaround that does the job 👍

pi-gen/stage4/07-workaround/00-run.sh

#!/bin/bash -e

sed -E -i \
  -e "s/^xkb_model.*/xkb_model = pc105/" \
  -e "s/^xkb_layout.*/xkb_layout = de/" \
  -e "s/^xkb_variant.*/xkb_variant = nodeadkeys/" \
  ${ROOTFS_DIR}/etc/wayfire/template.ini \
  ${ROOTFS_DIR}/etc/wayfire/gtemplate.ini