Inrtoduce BrightnessManager dbus interface - #2831
Conversation
|
Did you check whether it might already be exposed via org.gnome.mutter.displayconfig ? |
Yes, but I think it's better to abstract it with a gala interface. Otherwise both switchboard-plug-power and wingpanel-power would need to implement the same things (handling monitors changes, converting raw brightness values to percentages). Also you won't have to deal with complicated dbus types |
leolost2605
left a comment
There was a problem hiding this comment.
Yes, but I think it's better to abstract it with a gala interface. Otherwise both switchboard-plug-power and wingpanel-power would need to implement the same things (handling monitors changes, converting raw brightness values to percentages).
Hmm yeah that makes sense. Also I just saw there are vague plans to drop the backlight from the dbus api anyways 😅
Though I think we should use having to implement this to already prepare for individual multi monitor backlight control which AFAIR is the reason why gnome moved the brightness control into mutter.
Also ig we have to implement save and restore too since it was dropped from mutter (though that only made 51 so ig we can follow up):
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4814
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4006
b23a2d8 to
e2ce49c
Compare
e2ce49c to
0d6805b
Compare
|
@leolost2605 Rebased onto main and added keyboard shortcuts. |
Any thoughts on this? I'd like to do it now because it requires a different public API. |
Not really, IMO some kind of manager object is still needed to provide a way to control "global" brightness scale or perhaps lock other monitors' scales to a global one. The last commit does something like this, but it's super WIP. (And also it wouldn't compile due to another missing include in mutters' headers 🫠️) |
450e6ff to
ec074c8
Compare
ec074c8 to
c6b1c4d
Compare
Yeah I was wondering if we even need that? I mean what would be the "global" scale if you have two monitors which both support brightness adjustment? I had a quick look through your new commit and I think I wouldn't do individual dbus objects for individual monitors. The interface isn't expected to grow much bigger and having a single interface and addressing via an index is much simpler for the user of the interface IMO. Maybe something like this:
|
With gnome 49 screen brightness management was moved into mutter. This is a simple and naive implementation of backlight interface which could be controlled via DBus.
Note: to build this you would need mutter 50.2