Repository navigation
Look for a glass block before building its sed addresses - #15191
Merged
Merged
Conversation
Every theme switch runs omarchy-theme-set-glass on freshly rendered files, which never hold a block, yet each file first spawned two seds to escape the markers. Checking for the block first takes the step from ~11ms to ~3ms. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
This was referenced Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
omarchy-theme-set-templatesends withomarchy-theme-set-glass "$NEXT_THEME_DIR", which sits on the critical path of every theme switch, before the shell sees the new palette. For each of five terminal/btop files,remove_blockspawned twosedsubshells to escape the marker strings, and only then grepped for a block. A freshly rendered theme file never holds a block, so that work was always thrown away.The grep now runs first, and the seds only run when there is a block to remove.
Measurements
omarchy-theme-set-glasson a freshly rendered Tokyo Night staging dir, 10 runs: 110ms → 32ms, so ~11ms → ~3ms per theme switch. Template rendering as a whole drops from ~30–45ms to ~22–37ms.Tests
The existing glass coverage in
hyprland-window-transparency-test.sh(adding, replacing and removing blocks, newline restoration) passes unchanged, as dotheme-templatesandtheme-staging. The behaviour is identical. This only reorders work, so no new test.🤖 Generated with Claude Code