2021-09-26 11:08:45 +02:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
2023-07-01 01:49:05 +02:00
|
|
|
let
|
|
|
|
script = pkgs.writeShellScript "script.sh" ''
|
|
|
|
echo "test"
|
|
|
|
'';
|
|
|
|
in {
|
2021-09-26 11:08:45 +02:00
|
|
|
services.sxhkd = {
|
|
|
|
enable = true;
|
2019-09-15 23:12:08 +02:00
|
|
|
|
2021-09-26 11:08:45 +02:00
|
|
|
package = config.lib.test.mkStubPackage { outPath = "@sxhkd@"; };
|
|
|
|
|
|
|
|
keybindings = {
|
|
|
|
"super + a" = "run command a";
|
|
|
|
"super + b" = null;
|
|
|
|
"super + Shift + b" = "run command b";
|
2023-07-01 01:49:05 +02:00
|
|
|
"super + s" = script;
|
2021-09-26 11:08:45 +02:00
|
|
|
};
|
2019-09-15 23:12:08 +02:00
|
|
|
|
2021-09-26 11:08:45 +02:00
|
|
|
extraConfig = ''
|
|
|
|
super + c
|
|
|
|
call command c
|
2019-09-15 23:12:08 +02:00
|
|
|
|
2021-09-26 11:08:45 +02:00
|
|
|
# comment
|
|
|
|
super + d
|
|
|
|
call command d
|
2019-09-15 23:12:08 +02:00
|
|
|
'';
|
|
|
|
};
|
2021-09-26 11:08:45 +02:00
|
|
|
|
|
|
|
nmt.script = ''
|
|
|
|
sxhkdrc=home-files/.config/sxhkd/sxhkdrc
|
|
|
|
|
|
|
|
assertFileExists $sxhkdrc
|
|
|
|
|
2023-07-01 01:49:05 +02:00
|
|
|
assertFileContent $sxhkdrc ${
|
|
|
|
pkgs.substituteAll {
|
|
|
|
src = ./sxhkdrc;
|
|
|
|
inherit script;
|
|
|
|
}
|
|
|
|
}
|
2021-09-26 11:08:45 +02:00
|
|
|
'';
|
2019-09-15 23:12:08 +02:00
|
|
|
}
|