SessionsManager is a script add-in command for Directory Opus that allows users to manage layouts (hereafter called sessions), which can be created manually or automatically based on events.
Key Features:
- Automatically create sessions based on events, such as opening or closing a Lister, a tab, or even using timers.
- Manually create sessions, with the ability to set a description and even tags for easier future retrieval.
- Manage and load saved sessions from an easy-to-use interface.
IMPORTANT: READ BEFORE PROCEED
This script is provided "as is" and without warranty of any kind or whatsoever.
It has been made during my spare time and has not been extensively tested, so it is presented as a testing version.
The user assumes full responsibility for its use and understands that the author is not responsible for possible failures or loss of data.
Kind remind that this is a work in progress, so expect bugs.
Any feedback on possible improvements or bugs is very welcome.
How to Install
IMPORTANT: Needs at least DOpus v13.14.2
Download the file below. Then go to Settings / Scripts (or run Prefs SCRIPTINSTALL
) and select the downloaded file.
v0.9.6 Beta : SessionManager.opusscriptinstall
Options
In the Script Management window, select SessionsManager
and click in the Edit button.
- log level : Logging level to be displayed.
- OFF to show only errors.
- DEBUG to show all messages.
- STANDARD to show only the most relevant information.
- WARNING to show messages that needs your attention.
- max auto saved sessions : Set the maximum limit for auto-save sessions.
- show notify : Display a notification tooltip in the system tray whenever a session is auto-saved..
Usage
To manage saved sessions, use SessionsManager
.
To manage rules for autosave sessions, use SessionsManager SETRULES
.
The command supports the following arguments:
Command Arguments
ARGUMENT | TYPE | VALUE | DESCRIPTION |
---|---|---|---|
SAVE | /O | Manually save a session. You can specify a name by providing a value after the argument (e.g., SAVE=mysession). If no name is provided, you will be prompted for one. | |
DESC | /K | When manually saving a session, you can set a description using this argument. Use quotes if the description contains spaces. | |
TAGS | /K | When manually saving a session, you can set tags using this argument. Tags are separated by semicolons (;). Use quotes if the value contains spaces. | |
SILENT | /S | When manually saving a session and you provide a name using SAVE, use this argument to suppress the save dialog. Otherwise, you will be prompted for a name/description/tags. | |
LOADLAST | /S | Use this argument by itself to load the last saved session. | |
PAUSE | /S | Pause automatic session saving. | |
UNPAUSE | /S | Unpause automatic session saving. | |
TOGGLEPAUSE | /S | Toggle the pause status for automatic session saving. | |
SETRULES | /S | Show the dialog to establish rules for automatic session saving. |
Notes / Technical Stuff
- When using
SessionsManager LOADLAST
, if no session exists or the command fails, it will attempt to load the last known layout usingPrefs LAYOUT=!lastclosed
. - To avoid potential issues, the command enters an "automatic pause" mode for 5 seconds each time a session is automatically saved or a previously saved session is loaded via the command. During this period, all previously established events are ignored.
- When loading a session from the main window, press Shift to avoid close the dialog.
- It is possible to load a session with specific details. To do so, use the down-arrow icon on the "Load Layout" button in the main command window.
- There is a way to load a session as if it were a "Tab Group". For this, use the down-arrow icon on the "Load Layout" button in the main command window, and check the boxes "Load paths only using the current lister" and optionally "Without closing previously opened tabs".
- There is a global variable named SessionsManager:pause that indicates the current state of the command (i.e., whether it is paused or not). This can be useful for buttons or other tasks.
- If you would like to help by adding your language to the command's translation, send me a private message.
Acknowledgments
OpusDevelopers for including so many of my requests, which makes this command possible.
Icon courtesy of PhosphorIcon, a truly great collections that contains a lot of images.
Roadmap
- Add support for path searching so you can easily find a session that contains a tab matching a specific path.
- Possibly include more events for setting autosave rules.
- Create a database for all tags so that suggestions can be provided when setting them.
- Implement a way to identify sessions so that an automatic session isn’t saved if an identical session already exists.
Changelog
v0.9.6 b (Apr 13, 2025) : SessionManager.opusscriptinstall (16.6 KB)
- Initial release