OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
omarchy-theming low common DISPUTE

Fix a theme that applies from the CLI but never appears in the theme picker

hyprlandomarchyomarchy-4wayland
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

The cache mechanics are exact. bin/omarchy-theme-switcher builds ~/.cache/omarchy/theme-selector/previews as a symlink directory and hands only that to omarchy-menu-images. find_preview tries preview.png, .jpg, .jpeg, .webp, .gif, .bmp at maxdepth 1 and then falls back to find backgrounds -maxdepth 1 ... | sort | head -n 1. A theme with neither gets no symlink and so does not exist to the picker. The rebuild is gated on a fast signature built from stat -Lc '%Y' of the theme directories only, so a preview replaced in place can leave the cache stale. omarchy-theme-bg-cache is the separate warmer (omarchy-menu-images --cache-only over the theme backgrounds plus ~/.config/omarchy/backgrounds/<theme>) and omarchy-theme-set fires it in the background at the end of every theme change. cp -a from /usr/share/omarchy/themes/tokyo-night is the right Omarchy-4 path. Two errors: omarchy plymouth preview does not generate preview-unlock.png from unlock.png, because bin/omarchy-plymouth-preview requires four arguments (<background-hex> <text-hex> <logo.png> <output-path>) and errors out otherwise. The unlock picker lists a theme on preview-unlock.png alone (bin/omarchy-plymouth-list gates on that single file, and unlock.png is what omarchy-plymouth-set-by-theme then needs to apply it, so both still matter, just not for listing).

The cause above was not rewritten and may still contain the error described. The fix below is the corrected version.
RISK

~/.cache/omarchy/image-selector also holds every wallpaper thumbnail the background picker has ever generated. Deleting it is safe but the next Super+Ctrl+Space regenerates all of them, which is slow and CPU-heavy on a large wallpaper collection. Run omarchy-theme-bg-cache first and let it finish.

Symptom

omarchy theme set my-theme works, but the theme is simply not in the picker at Super+Ctrl+Shift+Space (Style > Theme): no tile, no blank tile, nothing. Or the tile is there but blank, or shows an image you replaced days ago. The background picker (Super+Ctrl+Space) shows blank tiles for wallpapers you just added.

Cause

bin/omarchy-theme-switcher does not list theme directories. It builds a directory of symlinks at ~/.cache/omarchy/theme-selector/previews, one per theme, and hands *that* to omarchy-menu-images. A theme only gets a symlink if find_preview finds something: a top-level preview.png / .jpg / .jpeg / .webp / .gif / .bmp, or failing that the first image inside backgrounds/. A theme with neither is never added to the directory, so it does not exist as far as the picker is concerned. Rebuilds are gated on a "fast signature" built from the mtimes of the theme *directories* only, so a preview that changed without the directory's mtime changing can leave the cache stale. Wallpaper thumbnails are a second, separate cache under ~/.cache/omarchy/image-selector, keyed by an md5 of the directory list and warmed by omarchy-theme-bg-cache, which omarchy-theme-set fires in the background at the end of every theme change.

Fix

Keep the cache steps as written (they are correct, including rm -rf ~/.cache/omarchy/theme-selector ~/.cache/omarchy/image-selector, omarchy-theme-switcher --preload, omarchy-theme-bg-cache). Replace the unlock-picker block with:


ls ~/.config/omarchy/themes/<name>/unlock.png ~/.config/omarchy/themes/<name>/preview-unlock.png

preview-unlock.png is what puts the theme in the Style > Unlock list, and unlock.png is what omarchy-plymouth-set-by-theme applies. Generate the preview with all four arguments:


THEME=~/.config/omarchy/themes/<name>
omarchy-plymouth-preview \
  "$(omarchy-theme-color --file $THEME/colors.toml background)" \
  "$(omarchy-theme-color --file $THEME/colors.toml foreground)" \
  $THEME/unlock.png \
  $THEME/preview-unlock.png

Verify

ls ~/.cache/omarchy/theme-selector/previews | grep <name> returns a symlink, and Super+Ctrl+Shift+Space shows the theme with an image on its tile.

Sources

theme-missing-from-picker-no-preview-image