Skip to content

Add installed icon-theme picker - #123

Open
mtolhuys wants to merge 1 commit into
omacom:mainfrom
mtolhuys:feature/icon-theme-picker
Open

Add installed icon-theme picker#123
mtolhuys wants to merge 1 commit into
omacom:mainfrom
mtolhuys:feature/icon-theme-picker

Conversation

@mtolhuys

@mtolhuys mtolhuys commented Aug 28, 2026

Copy link
Copy Markdown

What

Add a compact installed icon-theme chooser below Light mode, governed by Aether’s existing Icons target. It is neither a new top-level section nor an individual icon-file picker.

Important

Nearly half of the additions are regression and security tests, and no dependencies were added.

installed-icon-theme-picker

Why

I was about to build a theme creator-ish myself for this. Found out about Aether just in time (thanks for your work here!!) so decided to go for this PR instead.

The Icons target currently always generates Aether's palette-matched Yaru theme. This keeps that default intact while allowing an installed desktop icon theme to travel with the rest of an Aether/Omarchy theme.

Behavior

  • Automatic preserves Aether’s existing palette-matched Yaru output exactly.
  • Explicit writes the validated installed theme ID plus one newline.
  • Disabling Icons omits icons.theme without erasing the selection.
  • Missing or uninstalled selections remain visible and preserved instead of being silently replaced.

Review map

  • internal/icontheme/ — bounded XDG discovery, metadata parsing, containment checks, and rasterized previews.
  • internal/theme/, internal/blueprint/, and cli/ — state, serialization, validation, and output behavior.
  • frontend/src/ — chooser UI plus dirty-state and undo/redo integration.
  • frontend/wailsjs/ — generated Wails contracts.
  • Test files — backward compatibility, malformed input, traversal, symlink, preview, and serialization coverage.

The selection participates in editor state, dirty tracking, undo/redo, blueprints, import/export, CLI generation, and Omarchy-v4 output.

Safety

Discovery is read-only and bounded across standard XDG icon roots, with user-before-system precedence and symlink-containment checks. The WebView receives only metadata and backend-rasterized PNG previews—never arbitrary host paths or raw SVG/XPM.

Verification

Go tests (including race and Go 1.23.12), vet, Svelte checks, frontend regression tests, production builds, generated Wails bindings, and git diff --check pass. The complete interaction was also exercised in a disposable Omarchy-v4 desktop: enable Icons → choose Lab Blue → Apply Theme → Save and Apply. The generated and active icons.theme both contained exactly Lab-Blue\n.

@mtolhuys

Copy link
Copy Markdown
Author

Turns out “I would like to pick an icon theme” has a few more tentacles than the button suggests 😅

Kept it as one PR because the feature crosses discovery, editor state, serialization, generation, CLI, and UI. Splitting those paths would leave some awkward half-working pieces. Nearly half of the additions are focused regression and security tests, with no new dependencies.

Just say the word and I'll be happy to sharpen any rough edges that turn up during review!

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