parent
1422924908
commit
ac3c1f4fa4
4 changed files with 42 additions and 1 deletions
|
|
@ -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}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue