Finalise workspaces config

This commit is contained in:
2026-06-28 20:26:30 +01:00
parent 46d9fa3f6a
commit 4fc7944c48
2 changed files with 23 additions and 27 deletions
+1
View File
@@ -228,6 +228,7 @@ hl.window_rule({
hl.window_rule({
name = "steam-float",
float = true,
no_initial_focus = true,
workspace = "name:Gaming_1",
idle_inhibit = "fullscreen",
match = {
+9 -14
View File
@@ -6,15 +6,7 @@ local workspace_map = {
"Writing",
}
local monitor_binds = {}
local function setup_monitors()
-- Clear old binds
for _, bind in ipairs(monitor_binds) do
hl.unbind(bind)
end
monitor_binds = {}
local monitors = hl.get_monitors()
local monitor_count = #monitors
@@ -32,18 +24,13 @@ local function setup_monitors()
default = i == 1,
})
table.insert(
monitor_binds,
hl.bind(
"SUPER + code:1" .. (i - 1),
hl.dsp.focus({ workspace = "name:" .. workspace_name }),
{ description = "Switch to workspace " .. workspace_map[i] }
)
)
end
table.insert(
monitor_binds,
hl.bind("SUPER + SHIFT + code:1" .. (i - 1), function()
local active_workspace = hl.get_active_workspace()
local active_workspace_name = active_workspace.name
@@ -53,7 +40,15 @@ local function setup_monitors()
hl.notification.create({ text = new_workspace, duration = 2000 })
hl.dispatch(hl.dsp.window.move({ workspace = new_workspace, follow = false }))
end, { description = "Move window to workspace " .. workspace_map[i] })
)
end
-- A hack to move to the Home workspace when Hyprland first loads
if hl.get_active_workspace().id == 1 then
for j = monitor_count, 1, -1 do
local monitor = monitors[j]
hl.dispatch(hl.dsp.focus({ monitor = monitor.name }))
hl.dispatch(hl.dsp.focus({ workspace = "name:Home_" .. j, on_current_monitor = true }))
end
end
end