depot/third_party/home-manager/tests/modules/services/sxhkd/configuration.nix
Default email 75fa0ae5af Project import generated by Copybara.
GitOrigin-RevId: c3ab5ea047e6dc73df530948f7367455749d8906
2023-08-08 12:19:01 +02:00

42 lines
736 B
Nix

{ config, pkgs, ... }:
let
script = pkgs.writeShellScript "script.sh" ''
echo "test"
'';
in {
services.sxhkd = {
enable = true;
package = config.lib.test.mkStubPackage { outPath = "@sxhkd@"; };
keybindings = {
"super + a" = "run command a";
"super + b" = null;
"super + Shift + b" = "run command b";
"super + s" = script;
};
extraConfig = ''
super + c
call command c
# comment
super + d
call command d
'';
};
nmt.script = ''
sxhkdrc=home-files/.config/sxhkd/sxhkdrc
assertFileExists $sxhkdrc
assertFileContent $sxhkdrc ${
pkgs.substituteAll {
src = ./sxhkdrc;
inherit script;
}
}
'';
}