glazewm
glazewm copied to clipboard
Switch to previous workspace
Just wondering if there's a way to bind a key to switch to the previously focused workspace? I didn't see this in the list of commands but wanted to make sure I'm not missing anything.
Loving GlazeWM so far. Thank you!
this is a very necessary feature for any WM.
I am referencing the same feature in Workspacer
WM. https://github.com/workspacer/workspacer/issues/337
I think this would be a very helpful feature. I find this incredibly useful on i3wm / sway (workspace back_and_forth) especially in the auto-back-and-forth variant: When pressing the current workspace number it switches back to the last focused one.
I can do this task as follows. In WorkspaceService
, create a field to store the previous focused workspace name. Create a command (e.g. focus workspace undo
, I don't know what name to use) which checks if the previous focused workspace is available (there may be no switching or after config reload the old workspace may not be available) and does a switch to the workspace by name.
@lars-berger it's ok?
@kuznetsovvj Sure, that implementation sounds perfect 👍 The naming on the equivalent command in yabai sounds good, focus workspace recent
- maybe go with that?
@s-v-o I think it'd be cool to add the auto-back-and-forth
feature from i3 down the road, but that should be its own issue.
@lars-berger Again, I did not include a new command in the default configuration - I do not know what key combination to use.
feature is done @lars-berger maybe close this issue?
This is now a part of the latest release! 🎉