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

[Feature] Consider undeprecating should_launch_new_instance #1297

Closed
danielml-mx opened this issue Feb 3, 2025 · 5 comments
Closed

[Feature] Consider undeprecating should_launch_new_instance #1297

danielml-mx opened this issue Feb 3, 2025 · 5 comments

Comments

@danielml-mx
Copy link

Currently there is no intuitive way to open multiple documents with sioyek on both different windows and different instances. This leads to some issues with interfaces that expect different instances for every document opened.

Notice in this example how my terminal/WM swallows the first window I open but doesn't swallow the other (new) windows, and they all close when I press Q to quit since they are all within the same instance (I assume this is intended behavior, but I find it really unintiutive). Having all of them in a different instance would fix these issues.

out.mp4
@danielml-mx
Copy link
Author

Here's the expected behavior (using the build in the synctex_update branch):

screencapture-020225-185907.mp4

Each document gets opened in a different window and instance, gets swallowed properly and quitting one doesn't quit the other.

@ahrm
Copy link
Owner

ahrm commented Feb 3, 2025

There is a way to launch new instances by specifying the name in the development branch as of this commit: 4c99080. You should pass the --instance-name command line option.

@danielml-mx
Copy link
Author

danielml-mx commented Feb 3, 2025

Yes, and that's great if you want to manage different named instances, however this complicates matters when sioyek is not called directly from the command line but rather through multiple layers of software. In the examples above I am using the lf file manager and to achieve different instances per window, rather than just changing the value in sioyek's config, I would have to hard-code the lf config to use sioyek with the --instance-name option to open PDFs/ePUBs, and not only that, I would have to make it so that a new name is generated for every instance. This additionally forfeits compatibility with xdg-open, at least without having to edit sioyek's .desktop file to add the option and without using some trick to generate a new instance name from there, which leads me to my original conclusion: there is no intuitive way to open multiple documents with sioyek on both different windows and different instances (I guess 'simple' or even 'scriptable' would be a better adjective, but you get the point).

@ahrm
Copy link
Owner

ahrm commented Feb 4, 2025

I mean I will probably add an option to automatically create new instances, but if you window manager can not handle apps with multiple windows ... you need a better window manager!

@ahrm
Copy link
Owner

ahrm commented Feb 4, 2025

Re-added the should_launch_new_instance config and --new-instance commnad line option in 28c80ed.

@ahrm ahrm closed this as completed Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants