Skip to content

Compress the backgrounds and drop the configs Omarchy generates - #1

Open
omarchybot wants to merge 1 commit into
brianblakely:masterfrom
omarchybot:compress-backgrounds-and-drop-generated-configs
Open

Compress the backgrounds and drop the configs Omarchy generates#1
omarchybot wants to merge 1 commit into
brianblakely:masterfrom
omarchybot:compress-backgrounds-and-drop-generated-configs

Conversation

@omarchybot

Copy link
Copy Markdown

Reviewing the Corporate submission on omacom-io/omarchy-site (#46) turned up two things worth fixing here rather than there. The site pull request itself is fine — its preview is a correct 1200x675 webp at 98 KB.

backgrounds/ was 154 MB. Every user who installs the theme clones all of it. The six wallpapers were 7664x3284 PNGs of a flat gradient pattern, up to 2.1 bytes per pixel, which is a photograph-shaped image stored in a format meant for line art — 5.png alone was 52.86 MB. Re-encoded as webp capped at 4K wide the directory is 1.6 MB, and a downscaled comparison against the originals differs by an RMSE under 0.6%. Width is capped rather than fitting inside a 3840x2160 box so the ultrawide framing keeps its full width on a 4K panel.

before after
0 5.05 MB 0.07 MB
1 7.11 MB 0.07 MB
2 39.83 MB 0.26 MB
3 6.99 MB 0.09 MB
4 42.60 MB 0.52 MB
5 52.86 MB 0.58 MB

alacritty.toml, foot.ini, ghostty.conf, kitty.conf and neovim.lua were never reaching anyone. This is the one worth knowing about, because nothing on your machine would have shown it to you. omarchy-theme-set stages a theme that came from a git clone through a filter — stage_installed_theme in bin/omarchy-theme-set — which drops any *.lua along with those four terminal configs and vscode.json, since each one names a program the terminal launches or an extension to install. Omarchy regenerates them from your colors.toml through its own templates. A theme you wrote by hand in ~/.config/omarchy/themes is unrestricted, so these work when you test locally and then do nothing for anyone who installs the theme from GitHub. Your palette is unaffected: colors.toml is what drives every generated config.

If you want a setting that survives, ~/.config/omarchy/themed/<file>.tpl overrides the template Omarchy generates from — that is per-user rather than per-theme, which is the trade.

Reproduce the re-encode with:

magick input.png -strip -resize '3840>' -quality 82 output.webp

Nothing else is touched — the palette, the README and the theme's own choices are as you left them. Reviewed by Opus 5; no second model checked this one.

backgrounds/ was 154 MB. Every user who installs the theme clones all of it, and the six wallpapers were 7664x3284 PNGs -- a flat gradient pattern stored in a format meant for line art, at up to 2.1 bytes per pixel. Re-encoded as webp capped at 4K wide, the directory is 1.6 MB, and a downscaled comparison against the originals differs by an RMSE under 0.6%.

The four terminal configs and neovim.lua were never reaching anyone. omarchy-theme-set stages a theme installed from a git repo through a filter -- stage_installed_theme in bin/omarchy-theme-set -- that drops any *.lua along with alacritty.toml, foot.ini, ghostty.conf, kitty.conf and vscode.json, because each of those names a program to launch or an extension to install. They are regenerated from colors.toml through Omarchy's own templates instead. A theme written by hand in ~/.config/omarchy/themes is unrestricted, which is why these work locally and then do nothing for anyone who installs the theme from GitHub.

Width is capped rather than fitting the images inside a 3840x2160 box, so the ultrawide framing survives at full width on a 4K panel:

    magick input.png -strip -resize '3840>' -quality 82 output.webp

🤖 Generated by Opus 5 in Claude Code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant