From d8001d6e195a030a3328b6f47b421d83aa6babc4 Mon Sep 17 00:00:00 2001 From: "s0wlz (Matthias Puchstein)" Date: Wed, 3 Jun 2026 21:30:34 +0200 Subject: [PATCH] hypr: pin mail/joplin/steam workspaces to HDMI-A-2 and silence autostart Bind workspaces 1/4/5 to HDMI-A-2 so Thunderbird, Joplin and Steam open on a fixed monitor instead of the focused one, and append " silent" to every app workspace rule so autostarting apps no longer steal focus or flip the visible workspace at login. Also fix the Joplin class regex (@joplin/app-desktop -> joplin-app-desktop) which never matched. --- dot_config/hypr/hyprland.d.lua/rules.lua.tmpl | 12 ++++++------ dot_config/hypr/hyprland.d.lua/workspaces.lua.tmpl | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dot_config/hypr/hyprland.d.lua/rules.lua.tmpl b/dot_config/hypr/hyprland.d.lua/rules.lua.tmpl index 241f1ee..45be2cc 100644 --- a/dot_config/hypr/hyprland.d.lua/rules.lua.tmpl +++ b/dot_config/hypr/hyprland.d.lua/rules.lua.tmpl @@ -51,23 +51,23 @@ hl.window_rule({ hl.window_rule({ match = { xwayland = true }, no_initial_focus = true }) -- Communication -hl.window_rule({ match = { class = "^(info\\.mumble\\.Mumble|discord|vesktop|teamspeak-client|TeamSpeak|TeamSpeak 3|teamspeak3)$" }, workspace = "2" }) -hl.window_rule({ match = { class = "^(Element)$" }, workspace = "3" }) +hl.window_rule({ match = { class = "^(info\\.mumble\\.Mumble|discord|vesktop|teamspeak-client|TeamSpeak|TeamSpeak 3|teamspeak3)$" }, workspace = "2 silent" }) +hl.window_rule({ match = { class = "^(Element)$" }, workspace = "3 silent" }) -- Mail -hl.window_rule({ match = { class = "^(org\\.mozilla\\.Thunderbird)$" }, workspace = "1" }) +hl.window_rule({ match = { class = "^(org\\.mozilla\\.Thunderbird)$" }, workspace = "1 silent" }) -- Notes -hl.window_rule({ match = { class = "^(@joplin/app-desktop)$" }, workspace = "4" }) +hl.window_rule({ match = { class = "^(joplin-app-desktop)$" }, workspace = "4 silent" }) {{- if index $tags "entertainment" }} -- Multimedia -hl.window_rule({ match = { class = "Spotify" }, workspace = "6" }) +hl.window_rule({ match = { class = "Spotify" }, workspace = "6 silent" }) {{- end }} {{- if index $tags "cs2" }} -- Gaming -hl.window_rule({ match = { class = "^(steam)$" }, workspace = "5" }) +hl.window_rule({ match = { class = "^(steam)$" }, workspace = "5 silent" }) {{- end }} -- Game Content Bypass (Option A - per-monitor CTM bypass) diff --git a/dot_config/hypr/hyprland.d.lua/workspaces.lua.tmpl b/dot_config/hypr/hyprland.d.lua/workspaces.lua.tmpl index c42d6db..383fe86 100644 --- a/dot_config/hypr/hyprland.d.lua/workspaces.lua.tmpl +++ b/dot_config/hypr/hyprland.d.lua/workspaces.lua.tmpl @@ -4,13 +4,13 @@ hl.workspace_rule({ workspace = "special:passwordmgr", on_created_empty = "uwsm app -- bitwarden-desktop" }) -- Named Workspaces (IDs 1-6, sorted before numbered) -hl.workspace_rule({ workspace = "1", default_name = "mail" }) +hl.workspace_rule({ workspace = "1", default_name = "mail", monitor = "HDMI-A-2" }) hl.workspace_rule({ workspace = "2", default_name = "comms", monitor = "DP-2", layout = "scrolling", layout_opts = { direction = "down" } }) hl.workspace_rule({ workspace = "3", default_name = "element", monitor = "DP-2", layout = "scrolling", layout_opts = { direction = "down" } }) -hl.workspace_rule({ workspace = "4", default_name = "joplin" }) +hl.workspace_rule({ workspace = "4", default_name = "joplin", monitor = "HDMI-A-2" }) {{- if index $tags "cs2" }} -hl.workspace_rule({ workspace = "5", default_name = "steam", layout = "scrolling" }) +hl.workspace_rule({ workspace = "5", default_name = "steam", monitor = "HDMI-A-2", layout = "scrolling" }) {{- end }} {{- if index $tags "entertainment" }}