Repository navigation
feat(theme): follow the system light/dark mode - #2094
Conversation
Add a "Follow system light/dark mode" switch that tracks the desktop's light/dark preference (the color-scheme key of the org.gnome.desktop.interface) and switches between the light and dark versions of a curated Strata theme family. Strata keeps using its own palettes; it does not adopt the desktop's GTK theme, icons, or accent color.
only_gnome_prefer_dark_uses_night_appearance repeated the string comparison it called, and system_mode_uses_custom_overrides_by_stable_id re-checked the existing custom theme merge plus the pair lookup. The live GNOME test, the curated pairs test and the catalog merge test cover both.
While following the system light/dark mode, current_tokens still read the saved family anchor, so PDF text selection and the Add a theme editor used the other palette from the one on screen. Resolve it through the effective theme ID and drop the duplicate lookup.
Restore the code health the light/dark following lowered: group the GNOME settings and dark flag into SystemAppearance with its ThemeManager methods, derive Omarchy availability inside ThemeManager::new, replace the mode validity condition with a match, and extract the current theme row and theme source switches from theme_page.
Review and cleanupMerged Review against the description and #1812. Every claim checks out: the switch reads (never writes) Fixes pushed
Tests removed
Validation
Follow-ups outside this PR
CI: all checks green on |
…ollow-system Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RQ23ADLhhcsMQ5fRCT8Evz
Add a "Follow system light/dark mode" switch that tracks the desktop's light/dark preference (the color-scheme key of the
org.gnome.desktop.interface) and switches between the light and dark versions of a curated Strata theme family. Strata keeps using its own palettes; it does not adopt the desktop's GTK theme, icons, or accent color.Description
Adds a Follow system light/dark mode switch under Settings → Appearance. When it is on, Strata uses the light or dark version of the chosen Strata theme to match the desktop's light/dark mode, and switches live when that mode changes. The preference is read (never written) from the
color-schemekey oforg.gnome.desktop.interface:prefer-darkuses the dark version;defaultandprefer-lightuse the light one.Only the light/dark preference is followed. Strata keeps its own theme palettes and does not load the desktop's GTK theme, icon theme, or accent color.
color-schemesetting is unavailable, the switch is hidden and a savedmode = "system"falls back to"theme"at startup.docs/themes.md, anddocs/preferences.mddocument the behavior.Visual evidence
The change adds one switch row to Settings → Appearance and changes which Strata theme is applied when the desktop's light/dark mode changes.
How to test
gsettings set org.gnome.desktop.interface color-scheme prefer-dark. Strata uses One Dark.gsettings set org.gnome.desktop.interface color-scheme default(orprefer-light). Strata switches to One Light without a restart.Expected result: Strata's colors switch between the light and dark versions of the chosen Strata theme as the desktop's light/dark mode changes, and Strata's own themes stay in use throughout.
Related issue
Closes #1812