generate uni monitors all the same just by adding id

This commit is contained in:
twoneis 2025-01-20 02:17:06 +01:00
parent 908dc45aed
commit 22f0c2c895
2 changed files with 52 additions and 77 deletions

View file

@ -54,7 +54,7 @@ in {
}; };
programs.niri = { programs.niri = {
settings = import ./niri.conf.nix { config = config; }; settings = import ./niri.conf.nix { lib = lib; config = config; };
}; };
programs.fuzzel= { programs.fuzzel= {

View file

@ -1,5 +1,7 @@
{ config, ... }: let { lib, config, ... }: let
inherit (config.conf) keys extraLayout; inherit (config.conf) keys extraLayout;
inherit (lib.attrsets) genAttrs;
inherit (lib) mkMerge;
in { in {
input = { input = {
keyboard = { keyboard = {
@ -16,7 +18,8 @@ in {
power-key-handling.enable = false; power-key-handling.enable = false;
}; };
outputs = { outputs = mkMerge [
{
# Framework builtin Display # Framework builtin Display
"BOE 0x0BCA Unknown" = { "BOE 0x0BCA Unknown" = {
scale = 1; scale = 1;
@ -57,48 +60,20 @@ in {
}; };
background-color = config.theme.base; background-color = config.theme.base;
}; };
}
"Dell Inc. DELL U2415 7MT019A90F1U" = { (genAttrs
scale = 0.8; (map (id: "Dell Inc. DELL U2415 ${id}")
["7MT019A90F1U" "7MT019A90FRU" "7MT019A90F3U" "7MT019A909GU"])
(_: {
scale = 1;
mode = { mode = {
width = 1920; width = 1920;
height = 1200; height = 1200;
refresh = 59.950; refresh = 59.950;
}; };
background-color = config.theme.base; background-color = config.theme.base;
}; }))
];
"Dell Inc. DELL U2415 7MT019A90FRU" = {
scale = 0.8;
mode = {
width = 1920;
height = 1200;
refresh = 59.950;
};
background-color = config.theme.base;
};
"Dell Inc. DELL U2415 7MT019A90F3U" = {
scale = 0.8;
mode = {
width = 1920;
height = 1200;
refresh = 59.950;
};
background-color = config.theme.base;
};
"Dell Inc. DELL U2415 7MT019A909GU" = {
scale = 0.8;
mode = {
width = 1920;
height = 1200;
refresh = 59.950;
};
background-color = config.theme.base;
};
};
layout = { layout = {
focus-ring = { focus-ring = {