From d10f2cc00c1091f63e335df1d6913c7abddf06e5 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 10 Nov 2026 10:06:05 +0100 Subject: monitors: leave virtual outputs such as deck-it's TAB alone deck-it creates a headless TAB output at runtime and places it itself, centred under DP-1. Listed on the Monitors page, Apply would reposition it and Keep would pin it into monitors.lua, where it would outlive the tablet. Mon.js's UNMANAGED drops it from the page entirely. The list is fixed: deck-it's display.name can rename the output, and a renamed one shows up here again (a ponytail ceiling, noted in Mon.js). Co-Authored-By: Claude Opus 5.5 --- desktop/modules/monitors/test_mon.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'desktop/modules/monitors/test_mon.js') diff --git a/desktop/modules/monitors/test_mon.js b/desktop/modules/monitors/test_mon.js index 5d28ce4..f101dc7 100644 --- a/desktop/modules/monitors/test_mon.js +++ b/desktop/modules/monitors/test_mon.js @@ -17,7 +17,7 @@ const fs = require("fs"); const assert = require("assert"); const src = fs.readFileSync(__dirname + "/Mon.js", "utf8").replace(/^\.pragma library$/m, ""); -const M = new Function(src + "\nreturn { modes, current, draft, size, xy, lua, file, snap, AUTO };")(); +const M = new Function(src + "\nreturn { modes, current, draft, size, xy, lua, file, snap, managed, AUTO };")(); // Duplicates collapse, order kept, the Hz suffix dropped. assert.deepStrictEqual(M.modes(["1920x1080@60.00Hz", "1920x1080@120.00Hz", "1920x1080@120.00Hz", "1280x720@60.00Hz"]), @@ -44,6 +44,10 @@ assert.deepStrictEqual(M.size("2560x1440@60.00", "2", 7), { w: 720, h: 1280 }); // A scale mid-typing draws at 1 rather than Infinity or NaN. assert.deepStrictEqual(M.size("1920x1080@60.00", "", 0), { w: 1920, h: 1080 }); +// A virtual output is left out, a real one kept. +assert.deepStrictEqual(M.managed([asus, { name: "TAB", make: "", model: "" }]).map(m => m.name), + ["DP-3"]); + // Exact positions parse, auto ones fall back to where Hyprland put it. assert.deepStrictEqual(M.xy({ position: "-1080x-960", x: 0, y: 0 }), { x: -1080, y: -960 }); assert.deepStrictEqual(M.xy({ position: "auto-center-left", x: 5, y: 6 }), { x: 5, y: 6 }); -- cgit v1.2.3