fix(stylix): drive GTK4/Qt dark-light from the palette via color-scheme
Stylix set polarity and the GTK theme but not the XDG portal's org.freedesktop.appearance color-scheme, which GTK4/libadwaita and Qt6 apps actually read to choose dark vs light — so a light theme could still render those apps dark (and vice-versa). Set dconf org/gnome/desktop/interface color-scheme to prefer-light/prefer-dark from theme.mode in stylix.nix. xdg-desktop-portal-gtk already ships and programs.dconf is on system-side, so the portal exposes it to apps. Also log two branding follow-ups from the legacy assets: fastfetch ASCII logo (logo.txt) and the Nomarchy.ttf glyph for the Waybar menu button. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -276,7 +276,8 @@
|
||||
"Bash(nix-instantiate --parse modules/nixos/default.nix)",
|
||||
"Bash(cp /nix/store/f18ij42lmpg07fn1m29aplayakx7kqpz-splash-test.png/* preview-splash-built.png)",
|
||||
"Bash(cp /nix/store/f18ij42lmpg07fn1m29aplayakx7kqpz-splash-test.png preview-splash-built.png)",
|
||||
"Bash(nix-instantiate --parse hosts/live.nix)"
|
||||
"Bash(nix-instantiate --parse hosts/live.nix)",
|
||||
"Bash(nix-instantiate --parse modules/home/stylix.nix)"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
26
README.md
26
README.md
@@ -325,6 +325,16 @@ close · `SUPER+1..9` workspaces · `Print` region screenshot.
|
||||
(needs a full grub theme dir), and the `distroId` question (it changes
|
||||
`DEFAULT_HOSTNAME` and upstream `isNixos` checks — needs a test pass;
|
||||
nixos-* CLI names stay regardless)
|
||||
- **fastfetch branding:** legacy ships an ASCII-art logo
|
||||
(`core/branding/logo.txt` on the legacy branch) intended as the fastfetch
|
||||
image. Vendor it, resize to a sensible terminal width, and color it from
|
||||
the palette (accent), then wire a `fastfetch` config that uses it. (No
|
||||
fastfetch config in v1 yet.)
|
||||
- **Nomarchy logo font in Waybar:** legacy's `core/branding/Nomarchy.ttf`
|
||||
is a glyph font whose logo codepoint was used as the Waybar main-menu
|
||||
button (e.g. the summer-night bar). Vendor the font, install it, and set
|
||||
the `custom/nomarchy` button's `format` to that glyph (currently ``, a
|
||||
Nerd Font icon) so the button shows the real Nomarchy mark.
|
||||
- **Theme-switch feedback:** ✓ the "rebuilding…" notification is now
|
||||
persistent (timeout 0) and replaced in place by "applied ✓" / failure
|
||||
via a synchronous tag, so a multi-minute switch never reads as a failed
|
||||
@@ -402,11 +412,11 @@ close · `SUPER+1..9` workspaces · `Print` region screenshot.
|
||||
Waybar honours → all 10 rendered as phantoms. Dropped the block from
|
||||
`themes/summer-{day,night}/waybar.jsonc`; the other themes use the
|
||||
generated `waybar.nix`, which never had it, so they already match.
|
||||
- **GTK/Qt ignore the theme's light/dark mode:** `stylix.nix` sets
|
||||
`polarity` from `theme.mode`, but GTK4/libadwaita apps (and Qt via the
|
||||
portal) decide dark vs light from the `org.freedesktop.appearance
|
||||
color-scheme` / gsettings `org.gnome.desktop.interface color-scheme` key,
|
||||
which Stylix doesn't write — so a light theme can still render apps dark
|
||||
(and vice-versa). Fix: set `dconf` `color-scheme` =
|
||||
`prefer-dark`/`prefer-light` from `t.mode` (and confirm the
|
||||
xdg-desktop-portal exposes it), so libadwaita/Qt follow the palette.
|
||||
- ✓ **GTK/Qt ignore the theme's light/dark mode:** Stylix set `polarity`
|
||||
but not the `org.freedesktop.appearance color-scheme` that GTK4/libadwaita
|
||||
and Qt6 read via the portal, so a light theme could still render apps
|
||||
dark. `stylix.nix` now sets `dconf` `org/gnome/desktop/interface
|
||||
color-scheme` = `prefer-light`/`prefer-dark` from `t.mode`
|
||||
(xdg-desktop-portal-gtk already ships, and `programs.dconf` is on
|
||||
system-side), so libadwaita/Qt follow the palette. Needs a live session
|
||||
to confirm the portal picks it up for all apps.
|
||||
|
||||
@@ -86,5 +86,14 @@ in
|
||||
sizes.terminal = t.fonts.size;
|
||||
};
|
||||
};
|
||||
|
||||
# GTK4/libadwaita and Qt6 apps decide dark vs light from the XDG
|
||||
# portal's color-scheme (org.freedesktop.appearance), which
|
||||
# xdg-desktop-portal-gtk sources from this gsettings key. Stylix sets
|
||||
# the GTK theme and `polarity` but not this, so a light theme still
|
||||
# rendered libadwaita/Qt apps dark (and vice-versa). Drive it from the
|
||||
# palette mode. (programs.dconf.enable is already on system-side.)
|
||||
dconf.settings."org/gnome/desktop/interface".color-scheme =
|
||||
if t.mode == "light" then "prefer-light" else "prefer-dark";
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user