diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-10 10:06:05 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-10 10:06:05 +0100 |
| commit | d10f2cc00c1091f63e335df1d6913c7abddf06e5 (patch) | |
| tree | 8f4ef6c95f364721d0d2d3d8d4e2b73517ef95a0 /desktop/modules/monitors/test_mon.js | |
| parent | b5654d5ad7642d755ce7054ffbc281b0bc84c505 (diff) | |
| download | quickshell-d10f2cc00c1091f63e335df1d6913c7abddf06e5.tar.gz quickshell-d10f2cc00c1091f63e335df1d6913c7abddf06e5.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/monitors/test_mon.js')
| -rw-r--r-- | desktop/modules/monitors/test_mon.js | 6 |
1 files changed, 5 insertions, 1 deletions
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 }); |
