Fire script event when workspace changes / has changed

Started by monochrome, April 04, 2016, 10:42:08 PM

Previous topic - Next topic

monochrome

I'd like for events to be fired when the user selects a different workspace is selected.

1. Fired before the current workspace is disposed. This would enable the script to store any persistent data between workspaces. If possible, include the name of the workspace that is being switched to in the event.

2. Fired after the new workspace has started. (It can also be fired whenever the IMatch UI has started.) This would enable a script that stored persistent state in (1) to reload that state.

ubacher

Good idea!
I have two scripts I use before and after I switch work spaces: to save and restore the current working directory.
This because switching work spaces also switches directories. I don't do this often enough to justify an event script though.
What is you purpose?




monochrome

That's pretty much my reason for wanting this. Since it's very difficult to keep a script running across a workspace switch, I came up with this.

(I'm assuming that the cost of adding an event firing at a fairly well-defined point in IMatch's execution is small.)