From 5bfdc98e6139466b1ea2e61e475aefce99ebf9eb Mon Sep 17 00:00:00 2001 From: Frank Date: Fri, 30 Oct 2026 15:54:34 -0700 Subject: [PATCH] niri: make desk-2-portable a real profile for the second desk The portable rig (laptop + two 16" PM1601 panels in portrait) had no profile of its own, so display.kdl stayed on desk-1-home: the Sceptre identity block matched nothing, its connector-keyed fallbacks carried 3440x1440@180.000 that no panel here reports, and niri silently drove every panel at its preferred mode with positions written for the home desk. key the two panels by captured EDID identity, pin the modes they actually report, and centre the laptop against the 1920-tall panel band. desk.sh match now selects this profile, so blankpad-desk-autoswitch no longer dies at its initial match with "no desk profile matches". --- .../niri/.config/niri/cfg/desk-2-portable.kdl | 48 +++++++++++++++---- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/dotfiles/zz-blankpad/niri/.config/niri/cfg/desk-2-portable.kdl b/dotfiles/zz-blankpad/niri/.config/niri/cfg/desk-2-portable.kdl index 1f1f7e6..4701d98 100644 --- a/dotfiles/zz-blankpad/niri/.config/niri/cfg/desk-2-portable.kdl +++ b/dotfiles/zz-blankpad/niri/.config/niri/cfg/desk-2-portable.kdl @@ -1,18 +1,50 @@ -// ────────────── Desk Profile: portable (skeleton) ────────────── -// SKELETON — portable monitor EDID not captured yet. On first use at the -// portable desk: run `desk.sh capture`, replace PORTABLE-EDID-TBD below and -// in the requires list with the printed long name, adjust position to taste. +// ────────────── Desk Profile: portable (second desk) ────────────── +// Two PM1601 16" panels in portrait beside the laptop panel. +// Applied by symlinking this file to cfg/display.kdl (see scripts/desk.sh). +// Panels are keyed by EDID identity, NOT by connector name — connector names +// reshuffle between docks; identity travels with the panel. Long names copied +// verbatim from `niri msg outputs` (2026-10-30). +// // requires: Lenovo Group Limited 0x40A9 Unknown -// requires: PORTABLE-EDID-TBD +// requires: PNP(XYM) PM1601 0000000000000 +// requires: PNP(XYM) PM1601 demoset-1 +// +// Layout (logical, y grows downward; the two panels form one 2400x1920 band): +// +// ┌──────────────┬──────────┬──────────┐ +// │ │ PM1601 │ PM1601 │ +// │ │ rot 90 │ rot 90 │ +// │ eDP-1 │ 1200x1920│ 1200x1920│ +// │ 1920x1080 │ (DP-2) │(HDMI-A-1)│ +// │ │ │ │ +// └──────────────┴──────────┴──────────┘ +// x=0,y=420 x=1920,0 x=3120,0 +// +// The laptop sits 420 px down so its centre (960) meets the centre of the +// 1920-tall panel band — no dead corner where the cursor crosses. +// Modes are the panels' reported preferred modes, copied verbatim: niri +// matches mode strings exactly and silently falls back to preferred on a +// miss, so a typo here costs the refresh rate without an error. +// Reasoning: omp-docs/tools/niri/displays.md ("The config pattern"). output "Lenovo Group Limited 0x40A9 Unknown" { + mode "1920x1080@60.001" scale 1.0 - position x=0 y=0 + transform "normal" + position x=0 y=420 focus-at-startup } -// Assumed: 1920x1080 landscape panel right of the laptop panel. -output "PORTABLE-EDID-TBD" { +output "PNP(XYM) PM1601 0000000000000" { + mode "1920x1200@59.950" scale 1.0 + transform "90" position x=1920 y=0 } + +output "PNP(XYM) PM1601 demoset-1" { + mode "1920x1200@59.950" + scale 1.0 + transform "90" + position x=3120 y=0 +}