-
Notifications
You must be signed in to change notification settings - Fork 50
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
Communicate between Porcupine instances #1215
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome! I think we should make a new release before merging this, so that we can add --new-window
or whatever the option will be in a separate PR.
porcupine/__main__.py
Outdated
def open_files(files: Iterable[str]) -> None: | ||
tabmanager = get_tab_manager() | ||
for path_string in files: | ||
if path_string == "-": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Presumably this doesn't work when opening from tk send
. It would be nice if we could fix it (here or in a separate PR), so that you could do
$ some long command | porcu -
to show the output of the command in the currently running Porcupine instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it doesn't
I don't think this is needed, at least not for now. We can always add it later if someone needs it. |
You can revert #786. |
I already implemented this in DIP (yes, I know you can't open multiple instances yet but its set up to handle it) and feel like it will be a super awesome thing to have in Porcupine. |
I don't think that's how we want to do it. Especially because most of us use Porcupine on Linux. |
What do you mean by "Communicate between Porcupine instances" then? |
"Allow only a single Porcupine instance" and #92 |
"single Porcupine instance" and "Porcupine instances" are antonyms. "single... instance" means there's only one instance but the "s" in "Porcupine instances" infers multiple instances working together. If there's only "a single Porcupine instance", are you saying it needs to speak with itself? You said using it as an optional command but that would negate the need for this. All this to say: what? |
It means that when you try to open a file in Porcupine at the command line or by double clicking in the file manager, it doesn't create a completely new window, but sends it to an existing Porcupine process which will hamdle it. |
Ideally you could still have multiple Porcupine instances running. It just wouldn't be the thing that happens when you open files by double-clicking each one individually, instead they would all go to the same instance/process/window. |
This reverts commit 37aedef.
Nice to see some progress on this :) |
Oh man, what I just did to all the tests |
Uh oh man what'd you do 🙄😂? |
Idk. Something with the cache directory being elsewhere on GH actions. The tests work locally. |
Any updates on this? |
It works. The test need fixing, but otherwise it's good, AFAIR. |
This breaks the
poppingtabs
plugin, so some--new-window
command line option is needed.Would be also good to have a checkbox in the settings window to turn off this feature.