workspacer icon indicating copy to clipboard operation
workspacer copied to clipboard

a key binding to go to the recent workspace

Open azinsharaf opened this issue 2 years ago • 2 comments

hi, Is there any key binding available in Wokspacer to switch to the recent used workspace? Let's say I am on WS1 and then switch to WS5 (by ALT-5). Then I want to go back to the recent WS (and I don't need to remember its workspace number.)

I've used a similar key binding in yabai & skhd on MacOS which is so useful.

# fast focus desktop
alt - 0 : yabai -m space --focus recent

azinsharaf avatar Aug 23 '22 21:08 azinsharaf

https://github.com/workspacer/workspacer/blob/6a20e818331d7b708412a35fec032ae862e1f5bd/src/workspacer/Workspace/WorkspaceManager.cs#L83

Shouldn't that function do the work?

inql avatar Aug 24 '22 13:08 inql

That's it! Thank you, @inql. Since the default key binding already exists, do you think it can be added to "default set of key binding document" here? https://workspacer.org/keybindings/

from https://github.com/workspacer/workspacer/blob/master/src/workspacer/Keybinds/KeybindManager.cs#L319:L320

Subscribe(mod, Keys.Oemtilde,
    () => _context.Workspaces.SwitchToLastFocusedWorkspace(), "switch to last focused workspace");

azinsharaf avatar Aug 24 '22 15:08 azinsharaf