-
Notifications
You must be signed in to change notification settings - Fork 36
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
wf-panel: titlebar and desktops #48
Comments
What do you mean by client title widget? There is window-list widget if that's what you're looking for. Workspace information/control isn't provided by the wayfire shell protocol, and that would have to be added to create a workspace switcher widget. |
Ah, I missed the window list. I meant a widget that just displays the text of the title of the active window. I like to have that be in the panel center, like so: I know it's still early days, but if wayfire could dump it's status like bspwm/i3/sway/etc, users can easily create their own panels. Thanks for replying so quickly btw! |
bklaase, there is a protocol for that (this is how it is implemented for the current window-list). In this regard I think it may make sense to allow custom widgets in the same way wayfire plugins work, so you can then add this widget on your own. |
So, I'm dusting off my c++ "skills" and I want to start off very simple: Make a tool that, using the protocol can react to events (desktop changed, title changed, window created, etc) and dump info to STD out, so that people can use that in script based widgets/dmenu replacements. However, if you could give me a small nudge in the right direction (or point out why this approach is nonsene), I would greatly appreaciate it! I have read the wiki page on plugin-arch and looked at the code for various plugins and the wf-shell repo. I feel there are two approaches: make this into a plugin that outputs to a configuratble socket, which can then be read by various tooling (the bspwm / i3 / sway etc model) What would be a good starting place? |
This approach would be fine for displaying stuff from wayfire but wouldn't be able to talk back to wayfire for things like desktop switching and window control (focus/maximize/minimize/close).
Unfortunately, the plugin-arch page is pretty out-of-date. The source is probably the best reference and of course you can always ask about stuff you don't understand.
This would work but I feel this belongs in a standalone program rather than a plugin.
I don't think wf-shell is a good place for this.
I'd probably write a standalone program (C++ is not mandatory) that relays the protocol information to/from a socket and in turn, to any other client/script. |
A good starting place for showing the active window would be https://github.com/swaywm/wlroots/blob/master/examples/foreign-toplevel.c and the protocol that this example uses. There you can see how you can list all open windows on an output, and how you can listen for new window / window focused / etc. Maybe you want to create a small daemon similar to swayidle which internally uses a protocol to communicate with the compositor, but then exposes scripting capabilities? Wrt active desktop/workspace, there is this protocol here: swaywm/wlr-protocols#35 I think the best approach is creating the appropriate wayland protocols. With the changes to the governance of In any case, if you want to make a widget in wf-panel itself, then you'll have to change the panel's widget loading mechanism to just load arbitrary plugins from .so files like Wayfire does. This should not be hard since we already have some kind of interface for widgets in wf-panel, so the problem is porting the |
Thank guys, for these complete and helpful answers! And (re)picking up c++ is precisely that I can eventually start contributing to these great initiatives that I make use of daily. I am a developer by trait, just not systems level development, so it's a bit of a shift. In the short term, I do love working in a desktop environment that feels like a toy .. ;). So for the short term I want something that I can implement as quickly as possible to use wayfire as main driver (not much is required, since any WM/OS is basically a bootloader for Emacs, of course) and I feel that if I can retrieve title of active window, desktop layout (or even numbers) + active desktop, that I'm there. Well, that and having a 2 px border consistency for ALL windows (but that is effectively achieved with the option of preferring server (vs client) decorations, already) That's why this speaks to me:
However, I do expect the protocol still being something to link to on the compiler level? Not something that is exposed currently? It's refering to If I get started on this, would you prefer I keep asking questions in this issue, or some other way? Thanks again for taking the time to not only develop this great project, but also being so welcoming to the uninitiated :) |
@bklaase, the best way to reach out for help especially for development is #wayfire on freenode. It may not be ideal though since you'd need constant internet connection go receive replies. Anyway, Wayland is just a way for IPC. It is actually a socket internally afaik :) The protocols are built on top of this abstraction, and the header you mentioned is autogenerated to abstract away the lowlevel details from clients. |
ok! I'll use that channel then and close the issue :) |
Would it be much work to add a client title widget, and one that displays the available+active desktops?
Is there a way to query wayfire for them?
The text was updated successfully, but these errors were encountered: