Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some sort of custom post-unlock action/hook #1585

Open
CarlColijn opened this issue Mar 15, 2021 · 0 comments
Open

Add some sort of custom post-unlock action/hook #1585

CarlColijn opened this issue Mar 15, 2021 · 0 comments
Labels
type:feature-request New feature or request

Comments

@CarlColijn
Copy link

Summary

When a vault is unlocked, you currently can choose between "Do nothing" and "Reveal". While these are two great base options, sometimes extra functionality might be nice.

Motivation

One of my vaults is used to host my Thunderbird email folders. When I want to use Thunderbird I first have to unlock the corresponding vault, and then start Thunderbird afterwards. If there would be a third "custom" option for "after the vault unlocks...", I could specify the path to Thunderbird.exe to automatically start Thunderbird in one go, simplifying the entire process.

Another use case would be to automatically open a certain file in the unlocked vault itself after opening. I e.g. also have a vault with just a database in it; I could use this to launch the database in one go by pointing to it. Using ShellExecute under Windows this enables users to point to any document to start the associated app and open the pointed-to document in turn. Or just point to an executable directly to start that.

In the extreme users could go ham with this and create a custom script inside or outside the vault, to e.g. present a user interface listing all predetermined options to do with the opened vault's content, giving this feature unlimited potential.

Considered Alternatives

Another option would be to allow for a predetermined script in the root folder of the vault to run after unlocking (e.g. "cryptomator_post_unlock.cmd" if it exists), but that forces users to use the expected scripting technology that Cryptomator expects (in this case batch files).

Additional Context

When this extra post-unlock hook option enables you to do more than point to an (executable) file outside the vault, there should be a way to dynamically specify where the vault is mounted for the post-unlock hook action.

When pointing to files inside the vault, the post-unlock hook field could have a known keyword that gets replaced by the vault's mount location; e.g. <mount_location>\DynamicMenu.py. This does make a "Browse" button next to it a bit difficult to work with though.

And to let a post-unlock action also take action on the vault itself, it would be needed that Cryptomator passes the vault's mount location to the called action too. This could be done by letting users not only enter the path to an executable/script, but also supply command line arguments, and have a certain keyword expand to the vault's mount location, like C:\Scripts\DynamicMenu.py --vault <mount_location>

@CarlColijn CarlColijn added the type:feature-request New feature or request label Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant