OneDeadKey / kalamine

Keyboard Layout Maker
MIT License
103 stars 29 forks source link

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

Open fabi1cazenave opened 6 months ago

fabi1cazenave commented 6 months ago

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 commented 6 months ago

@fabi1cazenave There may be a hybrid option :

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!