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

dbus: DisplayConfig: support monitor configuration #912

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

Conversation

valpackett
Copy link

happy new year 🎉 this here PR extends the org.gnome.Mutter.DisplayConfig implementation enough to make the GNOME display settings work

niri-gnome-monitor-settings.webm

(XDG_CURRENT_DESKTOP=gnome gnome-control-center)

Copy link
Owner

@YaLTeR YaLTeR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks, this is pretty cool! Left some comments, also prepare to upgrade to zbus 5 since I'll be merging that PR soon.

@@ -45,6 +82,137 @@ pub struct LogicalMonitor {

#[dbus_interface(name = "org.gnome.Mutter.DisplayConfig")]
impl DisplayConfig {
async fn get_resources(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this method actually needed? The panel shows up as is for me, and I cannot actually find any calls to GetResources in gnome-control-center: https://gitlab.gnome.org/search?search=GetResources&nav_source=navbar&project_id=660&group_id=8&search_code=true&repository_ref=main

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The thing that calls it is gnome-rr but I forgot where I encountered usage of that API… ah. Not for Settings, but it's required for gsd-color. I'd like to get Night Light working, at least via an external client that would read g-s-d's temperature output and do wlr-gamma-control-unstable-v1 based on it, but for that gsd-color must actually work

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe in a separate PR then?

src/dbus/mutter_display_config.rs Outdated Show resolved Hide resolved
src/dbus/mutter_display_config.rs Outdated Show resolved Hide resolved
src/dbus/mutter_display_config.rs Outdated Show resolved Hide resolved
@valpackett valpackett force-pushed the push-qpmvznoktkvn branch 2 times, most recently from d3d7879 to d0f738b Compare January 4, 2025 04:05
This one is required by gsd-color via gnome-rr.

Also add a couple trivial methods to allow gnome-control-center to show
the displays panel.
This is required for gnome-control-center to be able to turn
monitors back on.
This enables gnome-control-center to apply display configuration
changes. Only temporarily, persistence is ignored currently.
@valpackett
Copy link
Author

Fixed commit descriptions, improved style according to discussions above, rebased on top of the zbus 5 changes, added fractional scales 🚀

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.

2 participants