fork/home-manager

git clone https://git.julia.blue/fork/home-manager

Kylie McClainautorandr: add filter option (#2795)970b57fd

master
1.4 KiB59 linesraw
1{ config, pkgs, ... }:
2
3{
4  config = {
5    programs.autorandr = {
6      enable = true;
7      profiles = {
8        default = {
9          fingerprint = {
10            DP1 = "XXX";
11            DP2 = "YYY";
12          };
13          config = {
14            DP1.enable = false;
15            DP2 = {
16              crtc = 0;
17              primary = true;
18              position = "0x0";
19              mode = "1920x1080";
20              filter = "nearest";
21              transform = [
22                [ 0.6 0.0 0.0 ] # a b c
23                [ 0.0 0.6 0.0 ] # d e f
24                [ 0.0 0.0 1.0 ] # g h i
25              ];
26            };
27          };
28        };
29      };
30    };
31
32    test.stubs.autorandr = { };
33
34    nmt.script = ''
35      config=home-files/.config/autorandr/default/config
36      setup=home-files/.config/autorandr/default/setup
37
38      assertFileExists $setup
39      assertFileRegex $setup 'DP1 XXX'
40      assertFileRegex $setup 'DP2 YYY'
41
42      assertFileExists $config
43      assertFileContent $config \
44          ${
45            pkgs.writeText "basic-configuration.conf" ''
46              output DP1
47              off
48
49              output DP2
50              pos 0x0
51              crtc 0
52              primary
53              mode 1920x1080
54              filter nearest
55              transform 0.600000,0.000000,0.000000,0.000000,0.600000,0.000000,0.000000,0.000000,1.000000''
56          }
57    '';
58  };
59}