niri: add disabled outputs option
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
5ba120d754
commit
a8b86890db
3 changed files with 25 additions and 11 deletions
|
@ -15,6 +15,11 @@
|
|||
refresh = 100;
|
||||
#// vrr = true;
|
||||
|
||||
desktops.niri.output = {
|
||||
connectors = ["DP-1" "DP-2" "DP-3"];
|
||||
disabled = ["HDMI-A-1" "HDMI-A-2" "HDMI-A-3"];
|
||||
};
|
||||
|
||||
programs.looking-glass = {
|
||||
enable = true;
|
||||
igpu = true;
|
||||
|
|
|
@ -102,6 +102,10 @@ in {
|
|||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsdebug
|
||||
settings.debug = {
|
||||
#// disable-direct-scanout = [];
|
||||
|
||||
# BUG: Crash when multiple outputs from the same monitor are enabled
|
||||
# https://github.com/YaLTeR/niri/issues/734
|
||||
disable-monitor-names = [];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ in {
|
|||
options.custom.desktops.niri.output = {
|
||||
enable = mkOption {default = false;};
|
||||
connectors = mkOption {default = [];};
|
||||
disabled = mkOption {default = [];};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -18,20 +19,24 @@ in {
|
|||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsoutputs
|
||||
#?? niri msg outputs
|
||||
programs.niri.settings.outputs = listToAttrs (forEach cfg.connectors (connector: {
|
||||
name = connector;
|
||||
name = connector;
|
||||
|
||||
value = {
|
||||
background-color = "#073642";
|
||||
value = {
|
||||
background-color = "#073642";
|
||||
|
||||
mode = with config.custom; {
|
||||
inherit width height;
|
||||
refresh = refresh + 0.0; # Convert to float
|
||||
mode = with config.custom; {
|
||||
inherit width height;
|
||||
refresh = refresh + 0.0; # Convert to float
|
||||
};
|
||||
|
||||
scale = config.custom.scale;
|
||||
variable-refresh-rate = mkIf config.custom.vrr "on-demand"; #!! Requires window-rule
|
||||
};
|
||||
|
||||
scale = config.custom.scale;
|
||||
variable-refresh-rate = mkIf config.custom.vrr "on-demand"; #!! Requires window-rule
|
||||
};
|
||||
}));
|
||||
})
|
||||
++ (forEach cfg.disabled (connector: {
|
||||
name = connector;
|
||||
value = {enable = false;};
|
||||
})));
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue