Repository navigation
feat(theme): terminal background opacity and wallpaper-tinted colors - #3662
Conversation
Compositor opacity fades the whole window, text included; only the terminal can make just its background translucent. DMS already writes a theme file per terminal, so a new Opacity setting adds each terminal's own key to the per-run template copy, the same mechanism "Terminals always dark" uses: background_opacity plus dynamic_background_opacity for kitty, alpha for foot, background-opacity for ghostty and [window] opacity for alacritty. At 100 nothing is written. dank16 keeps red, green and yellow close to their canonical hues, so much of the terminal palette looks the same on every wallpaper. A new profile (low, medium, high) rotates slots 1-4 and 9-14 toward the primary's HCT hue by 25/50/85% of min(0.8 x distance, 100 degrees), keeping chroma, tone and the existing contrast guards. Slots 0, 5-8 and 15 never change, and the default profile is byte-identical. Settings exposes it as "Colors from wallpaper" with an Intensity choice. Terminals are now signaled after every template render instead of only when dms-colors.json changed, so opacity- or palette-only changes reload kitty and ghostty. This also covers "Terminals always dark" in light mode, which rewrote terminal files without signaling. The shell passes the new flags only when they differ from the defaults.
|
/claude review |
Claude reviewOne scope issue; the rest looks correct.
|
The wallpaper terminal palette rotated the shared dank16 palette, which every template reads, so it also recolored the VS Code, Emacs, Zed and Zen themes and users' own templates. dank16 is now always generated without a profile, and the rotated palette is passed to matugen as dank16term, which only the terminal templates read.
# Conflicts: # core/internal/matugen/spec_test.go
|
Fixed: |
# Conflicts: # core/internal/matugen/matugen_test.go # core/internal/matugen/spec_test.go # core/internal/server/matugen_handler.go
|
/claude review |
Claude reviewNo issues found. The earlier scope finding is fixed: editor and user templates still read |
| } | ||
|
|
||
| SettingsButtonGroupRow { | ||
| text: I18n.tr("Intensity") |
There was a problem hiding this comment.
This is one case where we should have a short description with translator context, it isnt clear to me what intensity would do as a user.
There was a problem hiding this comment.
added it. This setting dictates how strongly the colors shift towards the wallpaper palette
Describe what the Intensity setting changes.
Description
This PR adds terminal background opacity and an option for terminal colors to follow the wallpaper.
Compositor opacity (window rules,
decoration.*_opacity) fades the whole window, text included. Only the terminal itself can make just its background translucent, and DMS already generates a theme file for each terminal, so that's where the setting goes. Separately, dank16 keeps red, green and yellow close to their canonical hues (pulled 4-12% toward the primary), so a large part of the terminal palette looks the same on every wallpaper.background_opacity+dynamic_background_opacity yesfor kitty,alphafor foot,background-opacityfor ghostty,[window] opacityfor alacritty. At 100 nothing is written. WezTerm's generated file is a color scheme, which can't carry opacity, so the docs give thewezterm.lualine instead--profile low|medium|high: slots 1-4 and 9-14 rotate their HCT hue toward the primary by 25/50/85% ofmin(0.8 × distance, 100°), keeping chroma, tone and the existing contrast guards. Slots 0, 5-8 and 15 never change (so the 5-on-6 pairing holds), anddefaultis byte-identical to todaydms-colors.jsonchanged. Otherwise an opacity-only change never reloads kitty or ghostty. This also fixes "Terminals always dark" in light mode, which rewrote the terminal files without signaling themNo new strings: every label is an existing term ("Opacity", "Colors from wallpaper", "Intensity", "Low", "Medium", "High").
A few things worth flagging:
--terminal-opacity/--terminal-paletteonly when they aren't the default, so an olderdmsbinary keeps working with defaults and the matugen run key doesn't change on upgrade. With a non-default value, an older binary rejects the flag and the whole theme run fails, the same as--source-modetoday.background_opacitychange in windows started withdynamic_background_opacityon, so windows open when Opacity is first lowered stay opaque until restarted. Later changes apply live.Validation
Slots 1-3 (red, green, yellow), dark mode, from
dms dank16 <hex> --json --profile <p>on this branch:#5b9694#b37553#4b9650#bbb354#5b9694#a77c41#34985f#a3b965#5b9694#958441#11996d#8bbd7a#5b9694#748c57#009881#6cc09a#8ad0ee#ff72a0#77ee84#fff672#8ad0ee#879bff#00ecf6#b8fff6#ffb693#ff7872#97ff7f#ffe572#ffb693#fd7d4e#ffe2be#ffe0c7--profile defaultoutput is byte-identical toupstream/masterfor 5 primaries, dark and light (10/10cmp)dms matugen generate --terminal-opacity 80(XDG dirs in a temp dir) wroteopacity = 0.8into alacritty's theme filego test ./...(everything exceptinternal/screenshot'sTestWaylandOutputBoundsScaled, which also fails onupstream/masteron this machine),GOOS=freebsd go build ./...,make lint-qml,make build,python3 quickshell/tests/run-qml.py logic qt lock, settings search index regenerated,prek runon the changed files. Skipped theqml-testshook (needs niri) and thego-testhook (the screenshot test above)Type of change
Related issues
New Settings

Screenshots / video
Current look:

Use wallpaper colors setting high:

Checklist
I18n.tr()with translator context, reusing existing terms where possiblemake fmt, added/updated tests,make testpasses, andgo mod tidyis cleanmake lint-qmlwith no new warnings