Skip to content

feat: Chrome theme + review fixes (v2)#113

Open
yukazakiri wants to merge 1 commit intosnowarch:prereleasefrom
yukazakiri:fix/chrome-theme-v2
Open

feat: Chrome theme + review fixes (v2)#113
yukazakiri wants to merge 1 commit intosnowarch:prereleasefrom
yukazakiri:fix/chrome-theme-v2

Conversation

@yukazakiri
Copy link
Copy Markdown
Contributor

@yukazakiri yukazakiri commented Apr 12, 2026

Summary

Chrome/Chromium/Brave theme integration with the Material You color pipeline, addressing all review feedback from PR #102. This is a clean single-commit branch rebased directly against prerelease.

Chrome theme improvements

  • Add chromium.theme contract file for reliable color resolution
  • Add BrowserColorScheme policy alongside BrowserThemeColor
  • Add elevate() with pkexec fallback + polkit agent detection
  • Add ensure_policy_dir_writable() for auto-setup of policy dirs
  • Add resolve_variant() for scheme-type Chrome theming
  • Prefer surface_container_low over primary for theme color
  • Fix variant name mapping (scheme-tonal-spottonal_spot)
  • Add Omarchy fork detection for CLI flag theming

Review feedback addressed

  • Restored updateLogPath, updateStatusPath, todoTxtPath in Directories.qml — actively consumed by ShellUpdates.qml, Todo.qml, and TodoWidget.qml
  • Kept hasExplicitTermColors — presets can still ship custom terminal color palettes (term1–term14)
  • Kept SCSS writing in writeGeneratedThemeContracts() — prevents stale SCSS after preset changes
  • Reverted saturation/lightness clamps to original values (0.85/0.75) and restored gentle harmony shift with maxShift cap
  • Added polkit agent detection in elevate() — avoids silent pkexec failures on systems without a running polkit agent

Other changes carried forward

  • GameMode: fullscreen auto-detection + suppress notifications toggle
  • NiriService, Notifications, YtMusic minor fixes
  • Settings: chrome theme toggle, game mode config
  • switchwall.sh: chromium theme integration

Testing

  • inir restart && inir logs — no errors
  • Switch wallpaper and verify Chrome picks up the new theme color
  • Switch preset theme and verify SCSS/terminal/chrome all update
  • Test elevate() on a system without polkit agent (should log warning, not hang)
  • Both panel families checked (shared Directories.qml/ThemePresets.qml changed)

Notes

Supersedes #102 with a clean rebase against prerelease (no Zed redundancy — already merged via #98).

Chrome theme improvements:
- Add chromium.theme contract file for reliable color resolution
- Add BrowserColorScheme policy alongside BrowserThemeColor
- Add elevate() with pkexec fallback + polkit agent detection
- Add ensure_policy_dir_writable() for auto-setup of policy dirs
- Add resolve_variant() for scheme-type Chrome theming
- Prefer surface_container_low over primary for theme color
- Fix variant name mapping (scheme-tonal-spot → tonal_spot)
- Add Omarchy fork detection for CLI flag theming

Review feedback addressed:
- Restore updateLogPath, updateStatusPath, todoTxtPath in Directories.qml
  (actively consumed by ShellUpdates.qml, Todo.qml, TodoWidget.qml)
- Keep hasExplicitTermColors so presets can ship custom terminal palettes
- Keep SCSS writing in writeGeneratedThemeContracts() to prevent stale
  SCSS after preset changes
- Keep original saturation/lightness clamps (0.85/0.75) and gentle
  harmony shift with maxShift cap
- Add polkit agent detection in elevate() to avoid silent pkexec failures

Other changes carried forward:
- GameMode: fullscreen auto-detection + suppress notifications toggle
- NiriService: minor fixes
- Notifications: minor fixes
- YtMusic: register config keys, persist volume
- Settings: chrome theme toggle, game mode config
- switchwall.sh: chromium theme integration
@yukazakiri yukazakiri force-pushed the fix/chrome-theme-v2 branch from 05a91d5 to 597123b Compare April 12, 2026 00:59
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.

1 participant