nixos: make keyboard layout module opt-in

This commit is contained in:
Primrose 2025-02-08 22:23:03 +01:00
parent c94d573ad0
commit 80d9cd67ec
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
7 changed files with 6 additions and 4 deletions

View file

@ -0,0 +1,41 @@
This folder contains my very awesome dvorak French layout on linux
# Ubuntu
`$XDG_CONFIG_HOME/.config/xkb` doesn't work.
[source](https://github.com/elias19r/xkb-layouts)
NOTE: make sure the copied file has no extension, otherwise your x11 will crash.
`# cp dvorak-french.xkb /usr/share/X11/xkb/symbols/`
`/usr/share/X11/xkb/rules/evdev.xml`
```xml
<layoutList>
...
<layout>
<configItem>
<name>dvorak-french</name>
<shortDescription>Baguette</shortDescription>
<description>French Dvorak</description>
</configItem>
</layout>
...
</layoutList>
```
`/usr/share/X11/xkb/rules/evdev.lst`
```xml
! layout
dvorak-french French Dvorak
```
## Swap escape and capslock
`dconf write /org/gnome/desktop/input-sources/xkb-options "['caps:swapescape']"`
(to undo, use `dconf reset`)
# Notes
Use `setxkbmap -option caps:swapescape` to swap escape and capslock
It is possible to reset this option by using the `-option` flag without any argument.
[source](https://askubuntu.com/a/830343)
## Sources
https://help.ubuntu.com/community/Custom%20keyboard%20layout%20definitions