TabRescue is a script add-in command for Directory Opus that implements a new system to manage recently closed tabs.
- Lets you save a history of closed tabs per Lister.
- Shows a list of the last x closed tabs, letting you reopen them easily with modifier-key support.
- Maximum saved-tabs count is configurable per Lister.
- You can customize how a tab is reopened.
IMPORTANT: READ BEFORE PROCEEDING
This script is provided "as is" and without any kind of warranty.
It was developed 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 acknowledges that the author is not liable for any failures or data loss.
Please note this is a work in progress, so bugs may occur.
Feedback on possible improvements or bug reports is highly appreciated.
How to Install
IMPORTANT: Requires DOpus v13.15 or later
Download the file below. Then go to Script Management (or run Prefs SCRIPTINSTALL
) and select the downloaded file.
Options
In the Script Management window, select TabRescue
and click the Edit button.
log level: Logging level to display.
max tabs per Lister: Maximum number of closed tabs to remember per Lister.
As for the key qualifiers, you can set how to reopen a closed tab in the 'Go Qualifiers' section:
none: Specifies how a closed tab is reopened when no key qualifier is held down.
alt: Specifies how a closed tab is reopened when the Alt key is held down.
shift: Specifies how a closed tab is reopened when the Shift key is held down.
ctrl: Specifies how a closed tab is reopened when the Ctrl key is held down.
alt+ctrl: Specifies how a closed tab is reopened when the Alt + Ctrl keys are held down.
alt+shift: Specifies how a closed tab is reopened when the Alt + Shift keys are held down.
ctrl+shift: Specifies how a closed tab is reopened when the Ctrl + Shift keys are held down.
Usage
You can show a list of recently closed tabs in that Lister, by using TabRescue LIST
.
TabRescue
also supports the following arguments:
Command Arguments
Argument | Type | Value | Description |
---|---|---|---|
LIST | /O | Shows a list of recently closed tabs, from which you can reopen them. | |
checkifexist | Discards nonexistent paths when displaying the list. | ||
LAST | /S | Quickly reopen the latest closed tab in the Lister. | |
PAUSE | /S | Pause the command, so it won't register any new closed tab. | |
UNPAUSE | /S | Unpause the command. | |
TOGGLEPAUSE | /S | Toggles the command’s pause state. | |
CLEAR | /S | Clear closed tabs list for the Lister. |
The command also exposes a Lister variable (TabRescue_count
) that lets you know how many closed tabs are currently saved, which is useful when creating buttons and defining their state.
For example, you could include this at the start of a button to disable it when no closed tabs exist in the Lister, since it wouldn’t make sense to show the command's list.
@eval:closed_tabs=IsSet("$lst:TabRescue_count") ? Val("$lst:TabRescue_count"):0;
@disableif:=closed_tabs==0
TabRescue LIST
The command's list allows quick filtering by tab name or path, and you can easily clear the list.
Use Up/Down to navigate the list.
Use Enter to open the selected item—the way the tab reopens depends on the modifier keys you use and their configuration.
Use F3 to focus the filter.
Use Esc to close the command dialog.
Use numbers from 0 to 9 to directly refer to an entry. Modifier keys apply as well. That is, pressing Ctrl+0 will open the path numbered as "0" , using the action defined for the "Ctrl" modifier.
Notes / Technical Details
- Note that the pause state is set per Lister, rather than globally.
- You can open only one command's list per Lister.
- Numeric references are disabled when the filter has focus and re-enabled when it loses.
Changelog
v1.1 (16-May-2025): TabRescue.opusscriptinstall (5.7 KB)
- Now the command will position its window more appropriately in case it would otherwise appear off-screen.
- You can now reference a numbered entry by using the corresponding number key (0 to 9). Modifier keys also apply in this context.
- Added some basic protection when trying to open invalid paths.
v1.0 (15-May-2025):
- Initial release.