-
Notifications
You must be signed in to change notification settings - Fork 177
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
Consider a simple IPC socket #49
Comments
Please don't implement it with DBus. IPC socket is enough. DBus is also implemented on top of sockets, but it brings more complication. |
@notramo I also prefer IPC, although I still haven't decided the format UPD: accidentally clicked close button |
@ammen99 what's the status for it? It'll be a really useful addon to later add wayfire-supported waybar modules, like "sway/workspaces". |
For that very specific use-case, we should eventually get a workspace protocol which would then work on any compositor supporting it (but I always postpone this task, so I can't say when it'll be implemented). Anyway, for the IPC idea status - I have no idea what would be useful. The following questions are open:
A necessary first step would be answering these questions, but as I said, I currently have no need of the IPC so I do not know what people would find useful - especially considering there are already plugins which will always be more powerful than any IPC we can come up with. |
While I agree plugins would always be more powerful than IPC, it's not possible to extend a third-party application to support wayfire, for example, Waybar. Maybe instead of integrating into the wayfire core code, each IPC socket could be integrated into the plugin code, on a per-need basis. Right now, I can think of adding IPC socket for the workspaces:
|
The way I see it, if someone wants to implement IPC for wayfire, they should create an ipc plugin. Aside from coming up with a solid API, there's not much more to it than writing an implementation including some sort of client.
The ipc plugin would interact with other plugins the same way that plugins currently interact. Perhaps it is the case that I don't fully understand the implications of this question but it seems like everything could be handled in the ipc plugin.
Since ipc would be a plugin, they would have the same 'power'. Again, perhaps I don't fully know what you mean by this. Also, there is a dbus plugin thanks to @damianatorrpm, that will likely be released eventually, which contains a fair set of capabilities. |
Yes, but then we need to define APIs. Like, plugins can register commands, emit events to the IPC, etc.
The more I think of it, the more this question fully overlaps with the 1. and 2, so it doesn't make sense. I'll remove it from my list. |
@shivanshs9 As I can see from your profile you are a skilled developer yourself, so I could add you to those people, granted that you do some work on wayfire.
Below you can see what the dbus plugins is capable of:
|
FWIW, the best approach for this is to support Xwayland DnD in wlroots, which is hard (wayland DnD icons are already multi-output in wayfire). |
@damianatorrpm I can't understand why that plugin needs to be released under a proprietary license anyways, especially compared to other big projects (like wayfire). While I gotta agree that your DBus plugin seems to have the capabilities I was looking for, and a lot more, I believe it makes sense to have it as an extension to wlroots, if it can indeed be used for any Wayland compositor. Anyways, I would prefer to discuss with @ammen99 @soreau, define APIs and implement an IPC plugin for Wayfire, even if it has only workspace-related capabilities. |
Sway-ipc and altdesktop/i3ipc-python provide examples of real usage. And https://github.com/Alexays/Waybar/wiki/Module:-Sway is simple query from serialized data is it not. If Wayfire model shell aims to add traditional desktop paradigm functionalities it could be used to test IPC powers and completeness. Waybar has Taskbar but is very limited. Not possible to mimic Windows' function of having pinned program launcher that once open transforms in active program windows control. I understand Wayland and XWayland have StartupWMClass and app-id confusion, and parent children spawn. If you could implement this functionality for Waybar with IPC and Wayfire shell from calling IPC plugin you have a strong benchmark of your architecture. |
This is already possible and it is supported via the |
It appears that the parties interested in an IPC implementation are ignoring the request for an API. Pointing to sway and other projects' documentation is simply not an answer. Until an API is proposed, there's not really much to discuss. |
Forgot to answer to this, if @shivanshs9 is willing to develop a plugin, I can provide some assistance in the technical parts (like integrating with core & plugins). |
It was reply for #49 (comment) with a more complex example but I forgot to quote in this terrible git UI. I don't need the feature and I don't need pull requests welcome. I will abstain, good luck. |
Indeed, I've already gone through their implementation. Once a basic plugin is ready, it won't be hard to use it in Waybar.
Why don't we focus on the minimal IPC capabilities we have thought of for now and start with their API?
@ammen99 Signal API can be reused for plugins to emit events to IPC, right? As for command registration, I'm not sure how one plugin triggers another one right now. Have been looking for a good example. Maybe we can chat in IRC to discuss more about it?
That would actually be great, thanks! 😄 |
I am not sure exactly the capabilities to which you refer. Do you mean your suggestions here?
Yes, it would probably be easier to hash out details on IRC.
If this does become a thing, it would be nice to have an in-house solution that doesn't rely on dbus but it looks like we might get both. |
Yeah, please come over to IRC, it is better suited for longer conversations and asking questions. |
Instantly turning off the screen with DPMS can't be done before this IPC can it? |
It can be done, see #455 (comment) |
Thanks! and sorry for the noise... I searched "DPMS" in the repository, and it is not written in #455. I edited the wiki. Thanks |
...granted, IMHO, this belongs somewhere more in view, given we must be a lot to use it in this form. |
I've been working on some convenience Bash functions wrapping @damianatorrpm's D-Bus plugin: https://github.com/tombh/wf-msg More discussion here: #1477 |
Wayfire now has a very basic ipc plugin providing the infrastructure for IPC commands, as well as a few very basic commands (the |
This would allow users to create simple scripts in the language they prefer. Of course, if #48 is solved, we can just provide bindings to common languages.
The text was updated successfully, but these errors were encountered: