feat(monitors): main external display, Samsung ultrawide support

monitors.lua picks the main external (Studio Display, else the Samsung
S34CG50 ultrawide, matched on EDID) and reloads the config when it changes.
Workspaces 1-4, the Wacom mapping, and its active-area aspect follow it.
eDP-1 uses auto-right so it sits beside whichever external is connected.

Also unbinds SUPER+RETURN / SUPER+SHIFT+RETURN (terminal and browser live
on SUPER+CTRL+ALT+J/K) and pins the Fastmail/Beeper scratch workspaces'
comments to eDP-1.
This commit is contained in:
Prad Nukala committed 2026-10-15 14:28:18 -04:00
1 parent de202fb5f8
commit 95c8d15814
4 files changed
+85 -27

No files matched your search

+16 -7
View File
@@ -28,19 +28,28 @@ require("default.hypr.toggles")
-- Add any other personal Hyprland configuration below.
-- o.window("qemu", { workspace = "5" })
-- Pin workspaces to monitors: 1-4 on the Studio Display, 5-8 on the laptop
-- Pin workspaces to monitors: 1-4 on the main external display (Studio
-- Display or Samsung ultrawide, see hypr/monitors.lua), 5-8 on the laptop
-- panel; 1 and 5 are what each shows on connect. Persistent so empty ones
-- stay on their monitor (the bar's workspace dots list them per monitor).
-- Matched on EDID description for the external display so it survives
-- landing on a different DP connector after re-docking.
-- The main external is picked at config load, and hypr/monitors.lua reloads
-- the config when it changes. Workspaces 1-4 that already exist are moved
-- over, since rules only place workspaces when they are created.
local monitors = require("hypr.monitors")
local external = monitors.external()
for id = 1, 8 do
hl.workspace_rule({
workspace = tostring(id),
monitor = id <= 4 and "desc:Apple Computer Inc StudioDisplay 0x984262A7" or "eDP-1",
monitor = id <= 4 and (external or monitors.externals[1]) or "eDP-1",
default = id == 1 or id == 5,
persistent = true,
})
end
if external then
for id = 1, 4 do
hl.dispatch(hl.dsp.workspace.move({ workspace = tostring(id), monitor = external }))
end
end
-- Always open these apps on a fixed workspace and follow them there. Classes
-- come from `hyprctl clients` -- the desktop files' StartupWMClass hints
@@ -59,12 +68,12 @@ o.window([[^tldraw-offline$]], { workspace = "5", fullscreen = true })
-- each resident gets its own column, in the order they appear.
--
-- SUPER + A / SUPER + CTRL + S: Tern; SUPER + SHIFT + A: Claude Desktop.
-- Each alone on its own workspace, Studio Display. Tern has no per-window
-- Each alone on its own workspace, main external display. Tern has no per-window
-- class flag, so every Tern window lands on the scratchpad.
o.window([[^so\.stencil\.tern$]], { workspace = "special:scratchpad silent" })
o.window([[^com\.anthropic\.Claude$]], { workspace = "special:claude silent" })
-- SUPER + CTRL + ALT + E / M: Fastmail and Beeper, each alone on the
-- focused monitor.
-- SUPER + CTRL + ALT + E / M: Fastmail and Beeper, each alone on its own
-- workspace, laptop panel (eDP-1).
o.window([[^com\.fastmail\.Fastmail$]], { workspace = "special:fastmail silent" })
o.window([[^Beeper$]], { workspace = "special:beeper silent" })
-- SUPER + CTRL + H: Google Home (Brave web app), on the focused monitor.