Notch theme switcher + keybind for the wallpapers tab - #88
Merged
gitcoder89431 merged 2 commits intoSep 29, 2026
Merged
Conversation
The notch's Wallpapers tab gains a WALLPAPER SWITCHER / THEME SWITCHER segmented control above its search box (direct request: "the 2 options will be above the search box, so theme will say search themes..."). Theme mode lists every installed Omarchy theme -- discovered by a new shipped list-themes.sh (same extraction-so-tests-cannot-drift pattern as list-wallpapers.sh) -- with omarchy-theme-switcher's own preview rules, and clicking a tile runs the real omarchy-theme-set, stopping any playing video/gif first with a fresh generation. The search placeholder follows the mode; switching modes clears the shared search box. Notch-only by design: the launcher's wallpaper card stays a pure picker (its sync comment says so now). New ruixen.notch toggleWallpapers IPC (same shape as toggleDashboard) backed by the SUPER+ALT+W recommended keybind, added to install.sh's --with-launcher-keybind set (the key was verified free of Omarchy defaults; SUPER+W and SUPER+SHIFT+W are taken). Guarded by tests/notch-theme-switcher.sh, which runs the real list-themes.sh against a fixture tree (preview.png, backgrounds-only, user-falls-back-to-system, user-over-system precedence, dot-dir skip) and pins the QML/IPC/installer wiring; registered in run-all.sh.
Collapses the WALLPAPER/THEME segmented control and search box into a single row, styled as one sliding tab pill on the right of the search field instead of two separate always-bordered chips. Also fixes two real bugs in the theme grid's own column math: the width formula could undercount how many columns GridView actually renders per row, and the tile-width formula was subtracting an extra, unearned gap on top of the correct one -- both are corrected so the grid now reliably renders the right column count at the widest tile size the row allows. Adds a magnify glyph in front of the search placeholder, matching the same icon ruixen.settings' own search box already uses. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
Two additions to the notch's Wallpapers tab, built as one feature:
A keybind for the tab. New
ruixen.notch toggleWallpapersIPC — same shape astoggleDashboard(a closed notch opens straight onto the Wallpapers tab, an open one just closes). The recommended keybind isSUPER + CTRL + SPACE; note that key is stock Omarchy's Background switcher, soinstall.shkeeps its existing "key already bound — leaving it untouched" behavior and prints the collision for manual unbind-first setup.docs/KEYBINDS.mdshows thehl.unbind+o.bindpair.A theme switcher in the tab. A
WALLPAPER SWITCHER / THEME SWITCHERsegmented control above the search box (direct request: "the 2 options will be above the search box, so theme will say search themes..."). Theme mode lists every installed Omarchy theme with real preview tiles and clicking one runs the realomarchy-theme-set— the same front door as Omarchy's own theme menu, after stopping any playing video/GIF with a fresh generation. The search placeholder follows the mode ("Search themes..." / "Search wallpapers..."); switching modes clears the shared search box.How
bars/widgets/ruixen.notch/list-themes.sh— same extraction-so-tests-cannot-drift rationale aslist-wallpapers.sh([P2] Extract wallpaper discovery into shared production code so tests cannot drift #17). It replicatesomarchy-theme-switcher's own preview rules (read directly, not guessed):preview.{png,jpg,jpeg,webp,gif,bmp}at the theme's top level, else the first sortedbackgrounds/image, else fall back to the same-name system theme. User themes (dirs or symlinks) union system themes (dirs), user copy winning — the same two-source resolutionomarchy-theme-setitself accepts.160→180px, same 10px gap rhythm as the wallpaper side), with the indivisible remainder centered so left/right margins are equal instead of a dead strip on the right (direct request). PreviewsourceSizetracks the rendered tile so larger tiles stay sharp. The launcher's own wallpaper card is deliberately unchanged — the keybind targets the notch tab, and that copy stays a pure picker (its sync comment says so now).applyThemewhitelist-validates the theme name against^[A-Za-z0-9][A-Za-z0-9_-]*$before it reaches a fixed-argv Process; labels renderText.PlainText; theme names come from directory basenames thatomarchy-theme-setre-normalizes itself.Tests
New
tests/notch-theme-switcher.sh(26 checks, registered inrun-all.sh): runs the reallist-themes.shagainst a fixture tree (preview.png, backgrounds-only, user-falls-back-to-system, user-over-system precedence, dot-dir skip, title-casing) and grep-pins the QML/IPC/installer wiring (segmented control placement above the search box, placeholder swap, whitelist +omarchy-theme-setrouting, stop-with-fresh-generation,toggleWallpapers, keybind recommendation + dry-run preview). Fullrun-all.shgreen.Live-verified on a real
omarchy restart shell: keybind registered (omarchy menu keybindingsshowsSUPER CTRL + SPACE → Ruixen wallpapers), toggle IPC opens the tab, theme grid renders all 25 installed themes with previews, and the apply path was exercised end-to-end against a stubbedomarchy-theme-seton PATH (optimistic CURRENT highlight, then re-synced fromtheme.nameafter the post-set refresh) — real themes untouched.