From 23ac3d73232f307186212293713d6801d37cff2a Mon Sep 17 00:00:00 2001 From: FluxTape Date: Tue, 19 Mar 2024 14:27:52 +0000 Subject: Workspace back and forth (#253) * implement workspace back and forth * Make our own ID counter instead of SerialCounter, use a newtype * Rename FocusWorkspaceBackAndForth to FocusWorkspacePrevious * Add focus-workspace-previous to tests * Don't special case in switch_workspace_previous * Minor clean up * Add switch_workspace_auto_back_and_forth to tests * Skip animation on switch_workspace_previous * Preserve previous_workspace_id on workspace movement * Make Workspace::id private with a getter Reduce the chance it gets overwritten. * Add test for workspace ID uniqueness * Update previous workspace ID upon moving workspace across monitors --------- Co-authored-by: Ivan Molodetskikh --- resources/default-config.kdl | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'resources') diff --git a/resources/default-config.kdl b/resources/default-config.kdl index ed3cdc3d..6b34e2ff 100644 --- a/resources/default-config.kdl +++ b/resources/default-config.kdl @@ -73,6 +73,11 @@ input { // Focus windows and outputs automatically when moving the mouse into them. // focus-follows-mouse + + // Uncomment this to enable workspace auto-back-and-forth. + // If enabled, switching to the same workspace by index twice will switch back to the + // previous workspace. + // workspace-auto-back-and-forth } // You can configure outputs by their name, which you can find @@ -518,6 +523,9 @@ binds { // Alternatively, there are commands to move just a single window: // Mod+Ctrl+1 { move-window-to-workspace 1; } + // Switches focus between the current and the previous workspace. + // Mod+Tab { focus-workspace-previous; } + Mod+Comma { consume-window-into-column; } Mod+Period { expel-window-from-column; } -- cgit