sector-f-linux

Sector F Linux
git clone https://git.sectorflabs.com/sector-f-linux.git
Log | Files | Refs | README | LICENSE

commit 713e6c57ecb3da45e8e07cf2b6d36c60a4adeb8e
parent 6f69d16b9a9771b92e784d99ce61c1b737191ac2
Author: Divan Visagie <me@divanv.com>
Date:   Sat, 28 Nov 2026 02:15:41 +0100

image: the desktop defaults to dark mode, for the whole OS (ADR-0020)

What the user asked for: dark as the default system theme, in the OS and not only the browser.

How it works: light or dark is a single setting on this desktop, GNOME's org.gnome.desktop.interface
color-scheme, which the settings portal passes on and which Patina's apps on the Default skin, GTK 4 apps and
Firefox follow live. Its schema default was "default" (read as light). A GSettings schema override
(usr/share/glib-2.0/schemas/90_patina.gschema.override) now makes the default "prefer-dark", and the
Containerfile compiles the schemas after the system files are copied in, with --strict so an invalid override
fails the build instead of being ignored.

It is a default and nothing more, which is the constraint the user stated for defaults: a person's own choice
in Settings is stored in their own dconf and sits on top, and an update never writes there. A machine whose
owner never chose will turn dark with the update (the intent); one whose owner chose Light keeps Light.

Tried in the image, not assumed: the override compiles under --strict; a user with nothing set reads
'prefer-dark'; after that user sets prefer-light it reads 'prefer-light'. The deprecated-path warnings that
glib-compile-schemas prints come from other packages' schemas and do not fail it.

Not tried yet: the whole chain on a running desktop (the portal reporting dark, the apps drawing dark). That
needs the next image in the test VM, together with the Firefox first-run checks.

Diffstat:
Adocs/adr/0020-the-desktop-defaults-to-dark.md | 38++++++++++++++++++++++++++++++++++++++
Mlinux/Containerfile | 3+++
Alinux/system/usr/share/glib-2.0/schemas/90_patina.gschema.override | 8++++++++
3 files changed, 49 insertions(+), 0 deletions(-)

diff --git a/docs/adr/0020-the-desktop-defaults-to-dark.md b/docs/adr/0020-the-desktop-defaults-to-dark.md @@ -0,0 +1,38 @@ +# 0020. The desktop defaults to dark + +Date: 2026-11-28 + +## Status + +Accepted (the user's direction: dark mode as the default for the whole OS, not just the browser). + +## Context + +Light or dark is one setting on this desktop: GNOME's `org.gnome.desktop.interface color-scheme` +(`default`, `prefer-light`, `prefer-dark`), which Settings' Appearance page and the desktop's menu write +(patina-desktop's ADR-0087). xdg-desktop-portal(-gtk) hands it on as `org.freedesktop.appearance +color-scheme`, and Patina's apps on the Default skin, GTK 4 apps and Firefox follow it live. Out of the box +it is `default`, which apps read as light. (The shell, the greeter and Files already use the Everforest +Dark skin, patina-desktop's ADR-0100; this is about everything that follows the setting.) + +## Decision + +- The schema's default for `color-scheme` is `prefer-dark`: `usr/share/glib-2.0/schemas/90_patina.gschema.override`, + compiled into the image (`glib-compile-schemas --strict` in the Containerfile, which fails the build on an + invalid override). +- It is a default, not a setting: a person's own choice (Settings, Appearance) is stored in their dconf and + sits on top of it, and an update never changes that. A machine whose owner has never chosen follows the new + default, which is the point; one whose owner chose Light keeps Light. + +## Tried + +In the image: the override compiles under `--strict`; the default reads `'prefer-dark'`; after a user sets +`prefer-light` it reads `'prefer-light'`. **Not tried yet:** the whole chain on a running desktop (the portal +reporting dark, and the apps drawing dark), which wants the next image in the test VM. + +## Not covered + +- GTK 3 apps do not read `color-scheme`; they follow the GTK theme name instead. The only one in the image is + Firefox, whose own window follows the portal, so nothing is missing today. +- A Light, Dark or Default switch in the setup wizard (ADR-0019) was not asked for; this makes the choice + once, for everyone, and Settings is where it is changed. diff --git a/linux/Containerfile b/linux/Containerfile @@ -103,6 +103,9 @@ COPY build/updater/ / # `rpm-ostree upgrade` (ADR-0009). /etc/hostname is here because the initramfs # carries Fedora's os-release, whose DEFAULT_HOSTNAME ("fedora") wins otherwise. COPY system/ / +# The defaults for GNOME's settings that system/ overrides (usr/share/glib-2.0/schemas/*.override, ADR-0020) +# only take effect once the schemas are compiled again. This fails the build if an override is not valid. +RUN glib-compile-schemas --strict /usr/share/glib-2.0/schemas # The splash: the theme, set as the default, and an initramfs that carries Plymouth and the theme, so # the splash is up from the first moment and not only after the root is mounted. The initramfs is diff --git a/linux/system/usr/share/glib-2.0/schemas/90_patina.gschema.override b/linux/system/usr/share/glib-2.0/schemas/90_patina.gschema.override @@ -0,0 +1,8 @@ +# Sector F Linux's defaults for GNOME's settings, which the desktop uses for its own (ADR-0020). +# These are the schema's defaults: a person's own choice (Settings, Appearance) sits on top of them and an +# update does not change it. Compiled into the image by the Containerfile (glib-compile-schemas). + +[org.gnome.desktop.interface] +# Dark, for the whole desktop: Patina's apps on the Default skin, GTK 4 apps and Firefox follow this, through +# the settings portal (org.freedesktop.appearance color-scheme). +color-scheme='prefer-dark'