Skip to content

Let themes set Hyprland rounding and shadow through colors.toml - #8210

Open
itsmoorgrove wants to merge 2 commits into
omacom:quattrofrom
itsmoorgrove:add-theme-decoration-tokens
Open

itsmoorgrove wants to merge 2 commits into
omacom:quattrofrom
itsmoorgrove:add-theme-decoration-tokens

Conversation

@itsmoorgrove

Copy link
Copy Markdown

Related to #7942, same root cause really. Since #7884 dropped every .lua from git-installed themes, there's no way left for a theme like that to set decoration.rounding or shadow, only border colors through colors.toml. A theme just silently loses its window rounding and shadow after install, no warning, nothing.

This adds a handful of optional colors.toml keys (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 into hyprland.lua.tpl through a new value helper, same pattern as the existing hypr_gradient/shell_gradient ones, 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.

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.
Copilot AI balanced review requested due to automatic review settings August 25, 2026 13:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables themes to configure Hyprland window rounding and shadows through colors.toml.

Changes:

  • Adds a generic template value helper.
  • 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:24 requires full lines in docs/.
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.

Comment thread docs/theming.md Resolved
@OldJobobo

Copy link
Copy Markdown
Contributor

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 hyprland.toml plus shared terminal opacity and blur settings. Linking it here so maintainers can compare the approaches and coordinate the overlap; I am not asking for this PR to be closed before they choose a direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants