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:
parent
f71b0358d3
commit
c0a531a023
2 changed files with 26 additions and 10 deletions
25
modules/home/gui/kbd/default.nix
Normal file
25
modules/home/gui/kbd/default.nix
Normal 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
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue