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

Shared properties #153

Open
Vzz1c opened this issue Aug 4, 2024 · 1 comment
Open

Shared properties #153

Vzz1c opened this issue Aug 4, 2024 · 1 comment
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@Vzz1c
Copy link

Vzz1c commented Aug 4, 2024

<property name="compare.first.selection.path" value="${selection.path}" />
The value of the property should be shared between different applications calling the context menu, for example if I use my own explorer and click on it and compare.first.selection.path produces the value, and I use TotalCMD to call the context menu, compare.first.selection.path doesn't have a value, it's in its initial state, of course, it doesn't have any value. doesn't have a value, it's the initial state, and of course, it's not just with TotalCMD, any application that can call a context menu can't share the property

@Vzz1c Vzz1c added the enhancement New feature or request label Aug 4, 2024
@end2endzone
Copy link
Owner

Sharing properties across multiple applications is not supported at the moment. I also do not plan to support this. The intended way right now is that each application loads their own instance of ShellAnything. All instances are independent from each other.

This feature would require communication between explorer.exe and TotalCMD.exe for synchronizing properties. ShellAnything is single threaded. This decision greatly simplifies the code and potentials problems. Shared properties across multiple applications also risk potential locks. For example, locking explorer.exe (not responsive) while TotalCMD.exe is processing Actions.

Also, some properties should absolutely not be synchronized across multiple applications. For example :

  • Environment variables : each application have their own set of environment variables.
  • Selection-based properties : each application can display a menu and select different files.
  • Fixed properties : many contains values based on the current executable. Also, by design, they should remain constant.
  • Live properties also would not need to be synchronized. By their nature, they can change every time they are resolved.

If you absolutely need this feature, you could implement it yourself with a plugin. Documentation is available in the User Manual. I would suggest that you design your plugin to something similar to the example sa_plugin_services. This plugin uses a callback function that is called when the selection changes (ShellAnything is updated and about to be displayed). You could implement your own properties synchronization mechanism between multiple ShellAnything instances at this point.

@end2endzone end2endzone added the wontfix This will not be worked on label Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants