diff options
author | Kaiden Fey <kookie@spacekookie.de> | 2020-09-21 14:12:32 +0200 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2020-09-21 14:12:32 +0200 |
commit | f80843dd45d7acd563d0a5b014cec3a2ea686fc2 (patch) | |
tree | 87189d873d6f932d85f9c1a480462b37d96cd6a5 /home-manager/tests/modules/programs/autorandr | |
parent | e0800985dab8f8ebb4cebdfd7e361fd1fafdb2a7 (diff) | |
parent | 9b1b55ba0264a55add4b7b4e022bdc2832b531f6 (diff) |
Merge commit '9b1b55ba0264a55add4b7b4e022bdc2832b531f6'
Diffstat (limited to 'home-manager/tests/modules/programs/autorandr')
3 files changed, 59 insertions, 0 deletions
diff --git a/home-manager/tests/modules/programs/autorandr/basic-configuration.conf b/home-manager/tests/modules/programs/autorandr/basic-configuration.conf new file mode 100644 index 00000000000..681574cf204 --- /dev/null +++ b/home-manager/tests/modules/programs/autorandr/basic-configuration.conf @@ -0,0 +1,10 @@ +output DP1 +off + +output DP2 +pos 0x0 +crtc 0 +primary +mode 1920x1080 +transform 0.600000,0.000000,0.000000,0.000000,0.600000,0.000000,0.000000,0.000000,1.000000 +scale 2x4
\ No newline at end of file diff --git a/home-manager/tests/modules/programs/autorandr/basic-configuration.nix b/home-manager/tests/modules/programs/autorandr/basic-configuration.nix new file mode 100644 index 00000000000..190511016fe --- /dev/null +++ b/home-manager/tests/modules/programs/autorandr/basic-configuration.nix @@ -0,0 +1,48 @@ +{ config, pkgs, ... }: + +{ + config = { + programs.autorandr = { + enable = true; + profiles = { + default = { + fingerprint = { + DP1 = "XXX"; + DP2 = "YYY"; + }; + config = { + DP1.enable = false; + DP2 = { + crtc = 0; + primary = true; + position = "0x0"; + mode = "1920x1080"; + scale = { + x = 2; + y = 4; + }; + transform = [ + [ 0.6 0.0 0.0 ] # a b c + [ 0.0 0.6 0.0 ] # d e f + [ 0.0 0.0 1.0 ] # g h i + ]; + }; + }; + }; + }; + }; + + nmt.script = '' + config=home-files/.config/autorandr/default/config + setup=home-files/.config/autorandr/default/setup + + assertFileExists $setup + assertFileRegex $setup 'DP1 XXX' + assertFileRegex $setup 'DP2 YYY' + + assertFileExists $config + assertFileContent $config \ + ${./basic-configuration.conf} + ''; + }; +} diff --git a/home-manager/tests/modules/programs/autorandr/default.nix b/home-manager/tests/modules/programs/autorandr/default.nix new file mode 100644 index 00000000000..5f12d409380 --- /dev/null +++ b/home-manager/tests/modules/programs/autorandr/default.nix @@ -0,0 +1 @@ +{ autorandr-basic-configuration = ./basic-configuration.nix; } |