feat(gui/kbd): add configurable ellipsis keybinding

- Introduce `gui.kbd.ellipsis.enable` option for keybinding.
- Move related xkb configuration to a dedicated module for clarity.
- Simplify `default.nix` by delegating ellipsis setup to the new module.
This commit is contained in:
Harald Hoyer 2025-03-20 09:11:09 +01:00
parent f71b0358d3
commit c0a531a023
2 changed files with 26 additions and 10 deletions

View file

@ -18,6 +18,7 @@
tools = {
git.enable = true;
};
gui.kbd.ellipsis.enable = true;
};
fonts.fontconfig.enable = true;
@ -64,16 +65,6 @@
};
dconf.settings."org/gnome/desktop/input-sources".xkb-options = [ "mod:ellipsis" ];
xdg.configFile."xkb/symbols/mod".text = ''
xkb_symbols "ellipsis" {
key <AB09> { [ period, greater, ellipsis, division ] };
};
'';
xdg.configFile."xkb/rules/evdev".text = ''
! option = symbols
mod:ellipsis = +mod(ellipsis)
! include %S/evdev
'';
xdg.enable = true;
xdg.mime.enable = true;

View file

@ -0,0 +1,25 @@
{ config, lib, ... }:
with lib;
let
cfg = config.metacfg.gui.kbd;
in
{
options.metacfg.gui.kbd = {
ellipsis = mkEnableOption "ellipsis keybinding for period key";
};
config = mkIf cfg.ellipsis {
xdg.configFile."xkb/symbols/mod".text = ''
xkb_symbols "ellipsis" {
key <AB09> { [ period, greater, ellipsis, division ] };
};
'';
xdg.configFile."xkb/rules/evdev".text = ''
! option = symbols
mod:ellipsis = +mod(ellipsis)
! include %S/evdev
'';
};
}