mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 17:39:37 +08:00
@@ -6,7 +6,7 @@
|
||||
}:
|
||||
let
|
||||
cfg = config.programs.foot;
|
||||
iniFormat = pkgs.formats.ini { };
|
||||
iniFormat = pkgs.formats.ini { listsAsDuplicateKeys = true; };
|
||||
in
|
||||
{
|
||||
meta.maintainers = with lib.maintainers; [ plabadens ];
|
||||
|
||||
@@ -2,4 +2,5 @@
|
||||
foot-example-settings = ./example-settings.nix;
|
||||
foot-empty-settings = ./empty-settings.nix;
|
||||
foot-systemd-user-service = ./systemd-user-service.nix;
|
||||
foot-regex-modes = ./regex-modes.nix;
|
||||
}
|
||||
|
||||
11
tests/modules/programs/foot/regex-modes-expected.ini
Normal file
11
tests/modules/programs/foot/regex-modes-expected.ini
Normal file
@@ -0,0 +1,11 @@
|
||||
[key-bindings]
|
||||
regex-launch=[one] Shift+Control+1
|
||||
regex-launch=[two] Shift+Control+2
|
||||
|
||||
[regex:one]
|
||||
launch=echo Regex one works
|
||||
regex=(some regex)
|
||||
|
||||
[regex:two]
|
||||
launch=echo Second also works!
|
||||
regex=(some other regex)
|
||||
29
tests/modules/programs/foot/regex-modes.nix
Normal file
29
tests/modules/programs/foot/regex-modes.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage { };
|
||||
|
||||
settings = {
|
||||
"regex:one" = {
|
||||
regex = "(some regex)";
|
||||
launch = "echo Regex one works";
|
||||
};
|
||||
"regex:two" = {
|
||||
regex = "(some other regex)";
|
||||
launch = "echo Second also works!";
|
||||
};
|
||||
|
||||
key-bindings.regex-launch = [
|
||||
"[one] Shift+Control+1"
|
||||
"[two] Shift+Control+2"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
home-files/.config/foot/foot.ini \
|
||||
${./regex-modes-expected.ini}
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user