aboutsummaryrefslogtreecommitdiff
path: root/home-manager/tests/modules/services/window-managers/sway/sway-followmouse.nix
blob: e05b4e56fc907829ecf96972f8914522799a2e58 (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
34
35
36
37
{ config, lib, pkgs, ... }:

with lib;

{
  config = {
    wayland.windowManager.sway = {
      enable = true;

      config = {
        focus.followMouse = "always";
        menu = "${pkgs.dmenu}/bin/dmenu_run";
        bars = [ ];
      };
    };

    nixpkgs.overlays = [
      (self: super: {
        dmenu = super.dmenu // { outPath = "@dmenu@"; };
        rxvt-unicode-unwrapped = super.rxvt-unicode-unwrapped // {
          outPath = "@rxvt-unicode-unwrapped@";
        };
        sway-unwrapped =
          pkgs.runCommandLocal "dummy-sway-unwrapped" { version = "1"; }
          "mkdir $out";
        swaybg = pkgs.writeScriptBin "dummy-swaybg" "";
        xwayland = pkgs.writeScriptBin "xwayland" "";
      })
    ];

    nmt.script = ''
      assertFileExists home-files/.config/sway/config
      assertFileContent home-files/.config/sway/config \
        ${./sway-followmouse-expected.conf}
    '';
  };
}