How to programmatically update current workspace?

Lately I started using Workspaces a lot. Discovered this script to programmatically select / save workspaces (from @dansroka)

Now I am wondering how I change @dansroka’s second script to programmatically save the currently selected workspace?

Seems save workspace "Test" overwrites an existing workspace named “Test”.

The question is: What returns the current workspace?

Sorry. Seems there is no way to get the name, so I think you’ll need to use a dummy record that saves the last opened workspace (see Script to select workspace).

Not sure if you use keyboard maestro but just in case … I use keyboard maestro to navigate me into workspaces.
For example:


Via add workspace menu, a similar script could be done to save a new workspace.

1 Like

Updating the current workspace via Keyboard Maestro is also possible

The ^ at the beginning tells Keyboard Maestro to use Regex, the * matches the current workspace.

1 Like

Very clever. Thanks for sharing @pete31
I believe that works in my eng-based version now after some trial and error on devon (the order is different as compared to Gehen zu vs Go > Update + Name

1 Like

Excellent! Exactly what I needed. Thanks.

I wonder if there is a way to preserve the setting “hide toolbar” in the workspace configuration?

My experiments so far show that this setting will not be preserved. The use-case is very simple: this will allow to have a workspace for one specific database used for writing - in this case i really want a highly minimal and uncluttered look.

No, the toolbar visibility will not be preserved in a workspace. Development would have to assess this.