Skip to content

fix(chrome): generate browser theme contract from wallpaper colors#102

Open
yukazakiri wants to merge 11 commits intosnowarch:devfrom
yukazakiri:04-01-fix_chrome-theme
Open

fix(chrome): generate browser theme contract from wallpaper colors#102
yukazakiri wants to merge 11 commits intosnowarch:devfrom
yukazakiri:04-01-fix_chrome-theme

Conversation

@yukazakiri
Copy link
Copy Markdown
Contributor

@yukazakiri yukazakiri commented Apr 1, 2026

Summary

Generate a dedicated chromium.theme contract in iNiR's generated theme directory and use it as the source of truth for Chromium-based browser theming.

Motivation

Chrome and Brave could end up with dark window chrome but the wrong browser theme color because the theming script was driven by the wallpaper seed/accent path instead of a browser-specific generated contract. This change makes wallpaper and preset theme generation emit ~/.local/state/quickshell/user/generated/chromium.theme as an RGB triplet, then updates the Chrome theming module to consume that file first and write managed policy with BrowserThemeColor and BrowserColorScheme.

compressO-recording_2026-04-01_12.49.03.mp4

Testing

Steps to verify this works:

  1. Run bash -n scripts/colors/switchwall.sh and bash -n scripts/colors/apply-chrome-theme.sh.
  2. Change the wallpaper or apply a preset theme, then confirm ~/.local/state/quickshell/user/generated/chromium.theme is created with an R,G,B triplet.
  3. Re-run the Chrome theming flow and verify Chromium/Chrome/Brave refresh to the generated browser surface color instead of the seed/accent color.

Checklist

  • Tested on Niri (or Hyprland if applicable)
  • Tested both ii and waffle families for UI changes
  • Tested material, aurora, and inir styles for ii changes
  • No hardcoded values (colors, fonts, durations use design tokens)
  • Config changes synced in Config.qml and defaults/config.json
  • Config access uses optional chaining: Config.options?.section?.option ?? default
  • IPC functions have explicit return types (: void, : string, etc.)
  • Shell restarted after changes: inir restart
  • Logs checked for errors: inir logs
  • Lazy-loaded components tested (Settings, overlays)
  • No console errors or warnings

Related

Closes #
Fixes #

yukazakiri and others added 11 commits March 29, 2026 16:54
Add new Zed editor theme target configuration with support for
Material You color generation. Refactor theme generator to improve
color parsing robustness by validating hex colors, supporting
multiple input sources (palette.json, terminal.json, SCSS), and
adding fallback default terminal colors. Remove hardcoded syntax
color configuration in favor of dynamic color handling.
Add input signature file to cache zed theme generation results
and skip regeneration when inputs haven't changed. This improves
performance by avoiding unnecessary theme rebuilds when source
files remain unchanged.

Introduce build_input_signature function that computes a checksum
of all input files including color palette, scss, terminal config,
template, and theme generator source. Store the signature in a
lock file and compare on subsequent runs to determine if
regeneration is needed.
removed some ugly thingy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants