Workspace Switcher

I made an action group which allows you to assign workspaces to the keyboard shortcuts ⌘2 to ⌘9 for quick switching. (⌘0 and ⌘1 are built in shortcuts to open the drafts and actions drawers respectively).

https://actions.getdrafts.com/g/1HZ

You just need to customise the URLs in each of the actions with the names of your workspaces.

6 Likes

I was finally able to sit and think about how to integrate this. Fantastic idea. Thanks for sharing it!

Makes me wish we had the ability to set the default action group for the extended row. Hopefully that can be added not only to Workspaces, but also to the URL scheme for this quick-switching option. Maybe @agiletortoise will consider it.

I’m still getting a handle on how to customize actions, but I seem to be missing something on how to make this work.

If I have a workspace called “Today”, is this the way I’d write the action?:

drafts5://x-callback-url/workspace?name={{TODAY}}

And then if I under “Options” in the url, I check “Open in Drafts”, shouldn’t it switch to the Today workspace from which ever workspace I’m already in when I hit (in this case) cmd+2?

Thanks in advance for your help.

It should work from a structural perspective, but isn’t your workspace called “Today” rather than “TODAY”?

If that is the case, I think you should have been getting an invalid URL error in your log.

That was it! All’s working now. Thanks!

This original action pre-dates the ability to script Workspaces. While it still works, I prefer a scripted selector now.

Here’s an example action which prompts to select from your Workspaces.

1 Like

Thanks! Very cool! Really appreciate it.

Great, thanks for sharing!