Vixen
dd8b0a81
csharp
public static class LinuxAppearance

What appearance the desktop is set to, asked of gsettings.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The freedesktop answer is org.gnome.desktop.interface color-scheme. It is GNOME-named and not GNOME-only: the XDG appearance portal reads the same key, and KDE, Cinnamon and Budgie all write it so that GTK applications follow their theme. There is no more portable source, which is why a desktop that has none of this reports Unknown rather than guessing from a GTK theme name.

⚠ This spawns a process, so it is read once and not polled. Every other platform's appearance is a memory or registry read that a frame loop can afford sixty times a second; this one is a fork, an exec and a D-Bus round trip. A desktop platform that polled it would spend more time asking about the theme than drawing — see DesktopAppearance, which is where that decision is enforced rather than here. Following a change on Linux needs a portal subscription, which this does not have.

Methods (1)

Used by (1)

  • DesktopAppearanceVixen.Platform.Desktop