mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
i3: add test of keybinding merge logic
This commit is contained in:
parent
bb64012914
commit
c42206db02
2 changed files with 36 additions and 0 deletions
34
tests/modules/services/window-managers/i3-keybindings.nix
Normal file
34
tests/modules/services/window-managers/i3-keybindings.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
xsession.windowManager.i3 = {
|
||||
enable = true;
|
||||
|
||||
config.keybindings =
|
||||
let
|
||||
modifier = config.xsession.windowManager.i3.config.modifier;
|
||||
in
|
||||
lib.mkOptionDefault {
|
||||
"${modifier}+Left" = "overridden-command";
|
||||
"${modifier}+Right" = null;
|
||||
"${modifier}+Invented" = "invented-key-command";
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/i3/config
|
||||
|
||||
assertFileRegex home-files/.config/i3/config \
|
||||
'bindsym Mod1+Left overridden-command'
|
||||
|
||||
assertFileNotRegex home-files/.config/i3/config \
|
||||
'Mod1+Right'
|
||||
|
||||
assertFileRegex home-files/.config/i3/config \
|
||||
'bindsym Mod1+Invented invented-key-command'
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue