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

Multiple Sleek instances / separate windows #654

Closed
amariusz opened this issue Feb 1, 2024 · 8 comments
Closed

Multiple Sleek instances / separate windows #654

amariusz opened this issue Feb 1, 2024 · 8 comments

Comments

@amariusz
Copy link
Collaborator

amariusz commented Feb 1, 2024

Sometimes it would be useful to have two Sleek windows with different set of todo.txt files, sorting, filtering etc.
Currently I'm able to run Sleek in two windows but changes in one window are reflected in the other - which is kind of strange, but still a feature :)

Probably the ony way right now to have 2 separate instances is to run Sleek 2 and Sleek 1.3 alongside.

Probably the easiest way to have multiple instances would be to use different config directories.
Could you add a command line switch to Sleek executable that accepts a path to custom config directory? That way user could create custom shortcut per instance.

@ransome1
Copy link
Owner

ransome1 commented Feb 4, 2024

@amariusz not sure if this is really a thing in the world of Electron/Chromium. This at least makes me doubt this is possible without bending the whole framework somehow.

What you might be looking for is a function of keeping the configuration bound to todo.txt files as described here: #588

Currently I'm able to run Sleek in two windows but changes in one window are reflected in the other - which is kind of strange, but still a feature :)

How do you run two instances of sleek (2.x) at the same time? If this is somehow possible, it wasn't intended by me tbh.

@amariusz
Copy link
Collaborator Author

amariusz commented Feb 4, 2024

@amariusz not sure if this is really a thing in the world of Electron/Chromium. This at least makes me doubt this is possible without bending the whole framework somehow.

There seems to be such possibility. code and chrome apps can be invoked in terminal with --help switch. Maybe this thread would be more helpful?
https://stackoverflow.com/questions/45051296/read-windows-command-line-option-in-electron-renderer-process

What you might be looking for is a function of keeping the configuration bound to todo.txt files as described here: #588

No, I'd like to work also on the same todo.txt file with different filters. Sleek seems to reload externally modified file quick enough to avoid data corruption.

How do you run two instances of sleek (2.x) at the same time? If this is somehow possible, it wasn't intended by me tbh.
As simple as opening two terminals (on linux) and launching sleek-2.0.8.AppImage in each one. Maybe there's a check just for windows?

If processing commandline arguments is problematic maybe you could consider those options:

  • using config from local directory if it's present next to sleek binary
  • ability to switch "profiles" similarly to what chrome offers for multiple accounts

Thanks!

@amariusz
Copy link
Collaborator Author

amariusz commented Feb 4, 2024

@andrei-a-papou
Copy link

andrei-a-papou commented Feb 27, 2024

What we're talking about here is a feature called "configuration profiles" and these are definitely possible with Electron. In addition, at least under Linux, you can quite easily run AppImage in a portable mode, which achieves the same thing: https://docs.appimage.org/user-guide/portable-mode.html

@amariusz
Copy link
Collaborator Author

amariusz commented Mar 8, 2024

Sorry for late reply. That's a great tip, thanks! I've tested it today and it seems to work fine with Sleek.

This method allows me to have multiple Sleek windows with independent configuration and common todo files, so I'm closing the issue.

@amariusz amariusz closed this as completed Mar 8, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in sleek 2.x Mar 8, 2024
@andrei-a-papou
Copy link

I've tested it today and it seems to work fine with Sleek

Why wouldn't it :)

That's a great tip, thanks!

Glad I could help!

@amariusz
Copy link
Collaborator Author

amariusz commented Mar 8, 2024

I could imagine several reasons :) But in short, luckily Sleek uses recent enough version of AppImageKit and have no explicit check that would prevent multiple instances.

@andrei-a-papou
Copy link

Another option for running an app like sleek with different configuration but shared todo files would be to dockerize sleek and have each Docker image access the todos via a shared volume on the host. That should work across platforms -- irrespective of AppImage or other packaging options.

@ransome1 Just an idea :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

3 participants