Repository navigation
Let themes set Hyprland rounding and shadow through colors.toml - #8210
itsmoorgrove wants to merge 2 commits into
Conversation
A theme installed with omarchy theme install has its .lua stripped for security (omacom#7884), so decoration.rounding and shadow can never come from a hand-written hyprland.lua, only border colors through colors.toml. Add a value template helper next to the existing gradient ones and use it to render those settings from plain colors.toml keys, falling back to Omarchy's current defaults when a theme leaves them unset.
There was a problem hiding this comment.
Pull request overview
Enables themes to configure Hyprland window rounding and shadows through colors.toml.
Changes:
- Adds a generic template
valuehelper. - Adds optional Hyprland decoration settings and defaults.
- Documents and tests template rendering behavior.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
bin/omarchy-theme-set-templates |
Implements plain-value template resolution. |
default/themed/hyprland.lua.tpl |
Renders rounding and shadow configuration. |
docs/theming.md |
Documents the helper and decoration keys. |
test/cli |
Tests custom and fallback rendering. |
Suppressed comments (3)
docs/theming.md:190
- This paragraph is also hard-wrapped;
AGENTS.md:24requires full lines indocs/.
If the theme defines `hyprland_rounding`, that value is used; otherwise the
fallback is tried as another palette key first, then used literally (`0`
here). This is how optional numeric/boolean settings, like the Hyprland
decoration keys below, stay valid Lua even when a theme never mentions them.
docs/theming.md:390
- This added paragraph is hard-wrapped, contrary to the full-line markdown convention in
AGENTS.md:24.
`hyprland.lua.tpl` also renders a `decoration` block from optional `colors.toml`
keys, using the `value` helper so a theme that never sets them still gets valid
Lua matching Omarchy's own defaults:
docs/theming.md:406
- This added paragraph is hard-wrapped, contrary to the full-line markdown convention in
AGENTS.md:24.
This is what lets a theme installed from a git repo (see
[What an installed theme may not ship](#what-an-installed-theme-may-not-ship))
still ship rounded corners and a window shadow, without shipping a
hand-written `hyprland.lua` that the staging filter would drop.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Thanks for pushing this forward. #8720 addresses the same post-#7884 gap: it includes rounding and shadows, then expands the declarative channel through an allowlisted |
Related to #7942, same root cause really. Since #7884 dropped every
.luafrom git-installed themes, there's no way left for a theme like that to setdecoration.roundingorshadow, only border colors throughcolors.toml. A theme just silently loses its window rounding and shadow after install, no warning, nothing.This adds a handful of optional
colors.tomlkeys (hyprland_rounding,hyprland_rounding_power,hyprland_shadow_enabled,hyprland_shadow_range,hyprland_shadow_render_power,hyprland_shadow_offset,hyprland_shadow_color,hyprland_shadow_color_inactive) rendered intohyprland.lua.tplthrough a newvaluehelper, same pattern as the existinghypr_gradient/shell_gradientones, just without the gradient parsing. A theme that doesn't set them falls back to the exact defaults Omarchy already ships, so nothing changes for any existing theme.Added tests for the new helper and both the with/without-keys render paths.