-
-
Notifications
You must be signed in to change notification settings - Fork 279
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
feat: Open files/folder in the file explorer #1117
base: main
Are you sure you want to change the base?
Conversation
this adds an option that will open a file explorer highlighting the file/folder selected. Still needs to be a little more careful on error handling
Interesting - the docs and the implementation suggest that it doesn't take care of being non-blocking nor being detached from the rnote process. I think on my Gnome installation it ends up being okay because it launches through dbus but for other systems/file-managers this might be an issue. Need to test it more with different distributions. Otherwise going with |
I may have changed my mind - looks like opener in general does not block, but there are no guarantees. And since we definitely don't want to block the |
Okay, then I'll revert the change and use open instead. I'd still like to have the reveal feature and I'm not 100% convinced of the one used currently. At least on windows it opens a new explorer no matter what even if another window revealing the same file is open. Pretty sure that's not how that works in vscode. |
Reopening #1089 after a github mess...
To fix #1053
I switched to opener and added the action to open the workspace folder in the folder submenu.
This is a PR that's very similar to #868, using a slightly different crate (opener) that has a reveal call and a MIT OR Apache-2.0 license.
The implementation detail for this is here https://docs.rs/opener/latest/opener/fn.reveal.html
The open crate doesn't have this option afaik but having two crates doing very similar things is slightly redundant
Tested only on linux aarch64 for now (but should be supported on all platforms)
One thing to verify is that opener does not have the same open::that_detached option, only opener::open and I don't know if that makes a difference or not