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".
This commit is contained in:
Frank committed 2026-10-30 15:54:34 -07:00
1 parent 9f142b7eaf
commit 5bfdc98e61
1 file changed
+40 -8
@@ -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
}