From 5b9382e0fcc435e78231b244ca5616741d3fa13f Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Sun, 13 Oct 2024 11:39:56 +0200 Subject: [PATCH] home/programs/niri: set displays for desktop --- home/programs/niri/default.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/home/programs/niri/default.nix b/home/programs/niri/default.nix index 8f16689..5cfa288 100644 --- a/home/programs/niri/default.nix +++ b/home/programs/niri/default.nix @@ -2,6 +2,7 @@ inputs, lib, pkgs, + config, osConfig, ... }: let @@ -40,6 +41,30 @@ in { always-center-single-column = true; }; + # https://github.com/sodiboo/system/blob/2978f4d79c51a5bd7e38a9cd75e3ec9046aa7e75/niri.mod.nix#L418-L434 + outputs = let + cfg = config.programs.niri.settings.outputs; + in { + "HDMI-A-1" = { + mode = { + width = 1920; + height = 1080; + refresh = 60.0; + }; + position.x = -cfg."HDMI-A-1".mode.width; + position.y = 0; + }; + "DP-1" = { + mode = { + width = 2560; + height = 1440; + refresh = 144.0; + }; + position.x = 0; + position.y = 0; + }; + }; + window-rules = [ { draw-border-with-background = false;