[xkb] do not install in existing xkb/symbols/[locale] files
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. ^_^
@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 lafayetteas well as the canonicalsetxkbmap 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!