aboutsummaryrefslogtreecommitdiff
path: root/home-manager/tests/modules/services/sxhkd/configuration.nix
blob: 03206a8d52b8e21d54aff337610a61647ff451ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ config, pkgs, ... }: {
  config = {
    services.sxhkd = {
      enable = true;

      keybindings = {
        "super + a" = "run command a";
        "super + b" = null;
        "super + Shift + b" = "run command b";
      };

      extraConfig = ''
        super + c
          call command c

        # comment
        super + d
          call command d
      '';
    };

    nixpkgs.overlays =
      [ (self: super: { sxhkd = pkgs.writeScriptBin "dummy-sxhkd" ""; }) ];

    nmt.script = ''
      sxhkdrc=home-files/.config/sxhkd/sxhkdrc

      assertFileExists $sxhkdrc

      assertFileContent $sxhkdrc ${./sxhkdrc}
    '';
  };
}