Closed Bug 1682523 Opened 4 years ago Closed 3 years ago

Programatically change`ui.systemUsesDarkTheme`

Categories

(Core :: Widget: Gtk, enhancement, P3)

78 Branch
enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1734073

People

(Reporter: hugo, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Steps to reproduce:

My desktop changes to dark mode on a schedule.

Different applications have different APIs and techniques for externally setting dark mode.

Actual results:

Dark mode cannot be set by external processes on a schedule. It must be done at manually by editing ui.systemUsesDarkTheme.

Expected results:

There should be some way of indicating this to Firefox.
On macOS, Firefox uses the OS's API for this.

On Linux, the elementary team is working on standardising a D-Bus spec for exposing a desktop-wide dark mode preference. Support for that would be great.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

Do you have a link for what the proposed D-Bus spec would look like / where is it being discussed?

So far what we do is inferring this from the GTK theme, which seemed to provide reasonable results, but we could conceivably use that and fall back to theme colors otherwise...

Flags: needinfo?(hugo)

There's ongoing discussion here: https://github.com/elementary/settings-daemon/issues/16

The above is specific for Elementary's desktop, but I myself am also working on a standalone daemon to toggle dark mode on various apps, and intend to expose the same DBus interface (so it can be used on other desktops and keep things compatible).

Flags: needinfo?(hugo)

We can do that when there's suitable DBus interface.

Priority: -- → P3

The standalone daemon I mentioned I've written will soon be implementing that same D-Bus API, so this is not a pointless duplicate.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.