Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[xkb] do not install in existing xkb/symbols/[locale] files #122

Open
fabi1cazenave opened this issue Feb 21, 2024 · 1 comment
Open

[xkb] do not install in existing xkb/symbols/[locale] files #122

fabi1cazenave opened this issue Feb 21, 2024 · 1 comment
Labels

Comments

@fabi1cazenave
Copy link
Collaborator

xkalamine installs layouts in xkb/symbols/[locale] files for historical reasons, and because let’s face it : writing

setxkbmap fr -variant lafayette

… is the coolest thing ever. ^_^

But that relies on some clunky text delimiters around every layout definition in those files, which is a very debatable design decision to say the least ; and it does not survive to an XKB upgrade, which is a pity.

A much saner approach would be to put all kalamine layouts in an xkb/symbols/kalamine subdirectory and associate those layouts to the proper locale in the xkb/rules/{base,evdev}.xml files. And selecting a layout on XOrg would become :+1:

setxkbmap kalamine/lafayette

And an intermediate approach would be to put all kalamine layouts directy in xkb/symbols buf forbid to overwrite non-kalamine layouts, which implies keeping the clunky text delimiters. We’d still avoid the loss of our layouts on an XKB upgrade, and the layout selection would become :

setxkbmap lafayette
setxkbmap lafayette -variant 101

… which looks pretty darn cool, too. ^_^

@wismill
Copy link
Collaborator

wismill commented Feb 22, 2024

@fabi1cazenave There may be a hybrid option :

  • Put the layouts in their own files in kalamine/
  • The XML uses these files (invisible for the user)
  • You may additionally add a variant in the locale that just include the corresponding section from the kalamine/* files. So you can use e.g. setxkbmap fr -variant lafayette as well as the canonical setxkbmap kalamine/lafayette.

This way your configuration via DE GUI tools should survive XKB update (being based on the XML file, it points to kalamine/* files), while only the aliases in the system files are deleted.

With this solution your hard work on the locale files was not all in vain!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants