diff --git a/.config/hypr/hyprland.lua b/.config/hypr/hyprland.lua index e728388..7f4d4c7 100644 --- a/.config/hypr/hyprland.lua +++ b/.config/hypr/hyprland.lua @@ -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" }))