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

Service for river tags and commands #585

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

spazzylemons
Copy link

This adds a new service that allows querying various information from and sending commands to the river compositor. It adds bindings for the control and status protocols, allowing sending commands to the river server and getting the title of the active window, list of focused tags, etc. To demonstrate usage I've added code to use river in the simple-bar example if it is detected.

I will admit the switching between services in the example is a bit messy, but there's no unified service yet. That would require some more work. Stuff like active window title would be easy to unify, but for workspaces, river uses a different "tag" system that's more flexible than workspaces, and can behave like Sway/Hyprland workspaces, but is more generalized. I don't see it as a huge concern, however, since most users will write their config to work with the compositor they use and not think about adding support for other setups.

Communication with river uses Wayland protocols, so I extended the gutils subproject to add two new C classes, River and RiverOutput, which convert the Wayland events into GLib signals. These classes are then wrapped in the river.ts to adapt the signals into the binding system.

There is one protocol that I have not yet added, which is the layout protocol. I have not implemented this mainly because I didn't see it used in Waybar and could not think of a reason to add it.

@kotontrion
Copy link
Contributor

ags is going to be replaced by astal, or to be more accurate the new major ags release (see the v2 branch) is just a scaffolding tool for astal.
astal already has support for river.

the astal-river lib can be used in ags, I have been doing that for a few months now.

@Aylur
Copy link
Owner

Aylur commented Sep 25, 2024

I appreciate the contribution and I'm genuinely sorry that your effort will be rejected.
I should've done it a long time ago, but I added a notice to the project's readme about v2.

@Aylur Aylur mentioned this pull request Sep 25, 2024
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

Successfully merging this pull request may close these issues.

3 participants