hyprland workspace back and forth fix

This commit is contained in:
2026-07-21 15:37:02 +02:00
parent e6d69e1e45
commit 7e7c62ec42
+7 -1
View File
@@ -40,6 +40,10 @@ hl.config({
animations = {
enabled = false,
},
binds = {
-- Selecting the current workspace again returns to the last workspace.
workspace_back_and_forth = true,
},
})
-- Dynamically hide the border when a workspace has exactly one tiled app.
@@ -99,7 +103,9 @@ for workspace = 1, 9 do
hl.bind(main_mod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = workspace }))
hl.bind(main_mod .. " + CTRL + " .. key, hl.dsp.window.move({ workspace = workspace, follow = true }))
end
-- Hyprland has no direct i3-style back_and_forth dispatcher; use numbered workspaces.
-- Match i3's back-and-forth workflow: Super+Tab switches to the last workspace;
-- selecting the current numbered workspace also returns to it.
hl.bind(main_mod .. " + TAB", hl.dsp.focus({ workspace = "previous" }))
hl.bind(main_mod .. " + CTRL + RIGHT", hl.dsp.focus({ workspace = "+1" }))
hl.bind(main_mod .. " + CTRL + LEFT", hl.dsp.focus({ workspace = "-1" }))