1
1
Fork 0

niri: add disabled outputs option

Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
Myned 2025-01-02 12:01:56 -06:00
parent 5ba120d754
commit a8b86890db
Signed by: Myned
GPG key ID: C7224454F7881A34
3 changed files with 25 additions and 11 deletions

View file

@ -15,6 +15,11 @@
refresh = 100; refresh = 100;
#// vrr = true; #// 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 = { programs.looking-glass = {
enable = true; enable = true;
igpu = true; igpu = true;

View file

@ -102,6 +102,10 @@ in {
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsdebug # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsdebug
settings.debug = { settings.debug = {
#// disable-direct-scanout = []; #// disable-direct-scanout = [];
# BUG: Crash when multiple outputs from the same monitor are enabled
# https://github.com/YaLTeR/niri/issues/734
disable-monitor-names = [];
}; };
}; };
} }

View file

@ -9,6 +9,7 @@ in {
options.custom.desktops.niri.output = { options.custom.desktops.niri.output = {
enable = mkOption {default = false;}; enable = mkOption {default = false;};
connectors = mkOption {default = [];}; connectors = mkOption {default = [];};
disabled = mkOption {default = [];};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -31,7 +32,11 @@ in {
scale = config.custom.scale; scale = config.custom.scale;
variable-refresh-rate = mkIf config.custom.vrr "on-demand"; #!! Requires window-rule variable-refresh-rate = mkIf config.custom.vrr "on-demand"; #!! Requires window-rule
}; };
})); })
++ (forEach cfg.disabled (connector: {
name = connector;
value = {enable = false;};
})));
} }
]; ];
}; };