way-displays: init module (#6791)
This commit is contained in:
parent
e15c4203ea
commit
f0c69ede70
8 changed files with 195 additions and 1 deletions
43
tests/modules/services/way-displays/configuration.nix
Normal file
43
tests/modules/services/way-displays/configuration.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
config = {
|
||||
services.way-displays = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage { };
|
||||
settings = {
|
||||
CALLBACK_CMD = "notify-send \"way-displays \${CALLBACK_LEVEL}\" \"\${CALLBACK_MSG}\"";
|
||||
ORDER = [
|
||||
"eDP-1"
|
||||
"DELL U2419HC"
|
||||
"DELL U2415"
|
||||
"HP E24 G5"
|
||||
"HP E24 G5"
|
||||
];
|
||||
ALIGN = "MIDDLE";
|
||||
VRR_OFF = [
|
||||
"DELL U2419HC"
|
||||
"DELL U2415"
|
||||
];
|
||||
TRANSFORM = [
|
||||
{
|
||||
NAME_DESC = "DELL U2419HC";
|
||||
TRANSFORM = "90";
|
||||
}
|
||||
{
|
||||
NAME_DESC = "HP E24 G5";
|
||||
TRANSFORM = "90";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
serviceFile=home-files/.config/systemd/user/way-displays.service
|
||||
assertFileExists $serviceFile
|
||||
|
||||
assertFileExists home-files/.config/way-displays/cfg.yaml
|
||||
assertFileContent home-files/.config/way-displays/cfg.yaml \
|
||||
${./configuration.yaml}
|
||||
'';
|
||||
};
|
||||
}
|
||||
16
tests/modules/services/way-displays/configuration.yaml
Normal file
16
tests/modules/services/way-displays/configuration.yaml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
ALIGN: MIDDLE
|
||||
CALLBACK_CMD: notify-send "way-displays ${CALLBACK_LEVEL}" "${CALLBACK_MSG}"
|
||||
ORDER:
|
||||
- eDP-1
|
||||
- DELL U2419HC
|
||||
- DELL U2415
|
||||
- HP E24 G5
|
||||
- HP E24 G5
|
||||
TRANSFORM:
|
||||
- NAME_DESC: DELL U2419HC
|
||||
TRANSFORM: '90'
|
||||
- NAME_DESC: HP E24 G5
|
||||
TRANSFORM: '90'
|
||||
VRR_OFF:
|
||||
- DELL U2419HC
|
||||
- DELL U2415
|
||||
3
tests/modules/services/way-displays/default.nix
Normal file
3
tests/modules/services/way-displays/default.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
way-displays-configuration = ./configuration.nix;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue