Skip to content

Say when an installed theme's files are refused - #8393

Open
scottjones wants to merge 1 commit into
omacom:quattrofrom
scottjones:report-refused-theme-files
Open

scottjones wants to merge 1 commit into
omacom:quattrofrom
scottjones:report-refused-theme-files

Conversation

@scottjones

Copy link
Copy Markdown
Contributor

omarchy-theme-set drops the files that would let a cloned theme run code, and explains itself on stderr. Switching themes from the menu discards stderr, so the explanation never arrives.

What that looks like in practice: a theme whose hyprland.lua carried its rounding, shadow and blur comes up with none of them. The palette is applied, so the theme half-works — which reads as a broken theme rather than a deliberate refusal. Working out why means finding is_denied_installed_file in omarchy-theme-set; the only trace on the machine is a stderr line nobody saw.

This reports the refusal where the switch was made, naming the files. It fires only when something was actually refused, so it is not a notification on every theme change.

I hit this on three installed themes from one author, each of which put its decoration in hyprland.lua. None of them contained a single os.execute, io. or require — the refusal is correct policy and they are collateral, which is exactly why saying so matters.

Two tests in test/shell.d/theme-staging-test.sh, stubbing omarchy-notification-send to record what would be sent: the hostile theme's refusal is announced and names hyprland.lua, and a theme with nothing refused announces nothing. Verified by mutation — removing the call fails the first.

./test/cli passes and omarchy commands --check passes at 436 commands. ./test/shell reports 5 of 206 files failing (config, locale-env, snapper, theme-install-guards, unowned-system-paths); all five fail identically on quattro without this branch on the same machine, so none are from this change.

Worth separating from this PR, but it is the reason I went looking: an installed theme currently has no declarative channel for visual identity at all. hyprland.conf is inert legacy, and the staged hyprland.lua is generated from Omarchy's template and carries border colours only. So rounding, shadows and blur are .lua or nothing, and .lua is refused. #8011, #8264 and #8266 all propose declarative theme data for other integrations; the same shape would fit here. Happy to open a separate issue if that is useful.

🤖 Generated with Claude Code

omarchy-theme-set drops the files that would let a cloned theme run code, and
says so on stderr. Switching themes from the menu discards stderr, so a theme
whose hyprland.lua carried its rounding, shadows and blur simply came up
looking wrong with nothing to explain it -- the settings are gone, the palette
is not, and the theme reads as broken.

Report the refusal where the switch happened. The notification only fires when
something was actually refused, and it names the files, so the loss is
attributable instead of mysterious.
Copilot AI balanced review requested due to automatic review settings August 26, 2026 13:54

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

Adds user-visible notifications when installed-theme files are refused during theme staging.

Changes:

  • Sends a notification listing refused files.
  • Tests notification and no-refusal 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 1 out of 2 changed files in this pull request and generated no comments.

File Description
bin/omarchy-theme-set Reports refused theme files via notification.
test/shell.d/theme-staging-test.sh Adds notification behavior coverage.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@tahadx

tahadx commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

omarchy-theme-set drops the files that would let a cloned theme run code, and explains itself on stderr. Switching themes from the menu discards stderr, so the explanation never arrives.

What that looks like in practice: a theme whose hyprland.lua carried its rounding, shadow and blur comes up with none of them. The palette is applied, so the theme half-works — which reads as a broken theme rather than a deliberate refusal. Working out why means finding is_denied_installed_file in omarchy-theme-set; the only trace on the machine is a stderr line nobody saw.

This reports the refusal where the switch was made, naming the files. It fires only when something was actually refused, so it is not a notification on every theme change.

I hit this on three installed themes from one author, each of which put its decoration in hyprland.lua. None of them contained a single os.execute, io. or require — the refusal is correct policy and they are collateral, which is exactly why saying so matters.

Two tests in test/shell.d/theme-staging-test.sh, stubbing omarchy-notification-send to record what would be sent: the hostile theme's refusal is announced and names hyprland.lua, and a theme with nothing refused announces nothing. Verified by mutation — removing the call fails the first.

./test/cli passes and omarchy commands --check passes at 436 commands. ./test/shell reports 5 of 206 files failing (config, locale-env, snapper, theme-install-guards, unowned-system-paths); all five fail identically on quattro without this branch on the same machine, so none are from this change.

Worth separating from this PR, but it is the reason I went looking: an installed theme currently has no declarative channel for visual identity at all. hyprland.conf is inert legacy, and the staged hyprland.lua is generated from Omarchy's template and carries border colours only. So rounding, shadows and blur are .lua or nothing, and .lua is refused. #8011, #8264 and #8266 all propose declarative theme data for other integrations; the same shape would fit here. Happy to open a separate issue if that is useful.

🤖 Generated with Claude Code

Yes it's better for ux

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