Skip to content

Say there is nothing to pick instead of opening an empty plugin or background picker - #18561

Merged
omarchybot merged 2 commits into
quattrofrom
empty-picker-messages
Nov 16, 2026
Merged

omarchybot merged 2 commits into
quattrofrom
empty-picker-messages

Conversation

@omarchybot

Copy link
Copy Markdown
Collaborator

Two pickers opened on an empty list instead of saying there was nothing to pick.

omarchy plugin remove after the last plugin is gone. With no id, it checked only that ~/.config/omarchy/plugins exists. Removing a plugin leaves that folder behind, so once the last plugin was removed, gum choose got no options. It printed no options provided, see gum choose --help and the command ended on omarchy-plugin-remove: cancelled. The list is now collected first. An empty list gives no plugins installed, the message it already gives when the folder is missing. A folder find cannot read gives could not read <folder>. Before, that case also ended on gum's message, and collecting the list under pipefail without a check would have made it exit silently.

The background switcher on a theme with no backgrounds. A theme that ships only colors.toml, as many community themes do, has no backgrounds. The switcher (Super+Ctrl+Space, Appearance > Background) handed its empty folders to omarchy-menu-images, which opened the image picker on no rows. The picker reveals itself only once a preview is ready, so it never appeared, but it still held the keyboard until Escape. omarchy-menu-images now exits 3 when it has nothing to offer. The check sits after its --cache-only, --prepare-only, --print-rows and --preload branches, so the shell's cached rows are still refreshed as before. The switcher then sends the "No background was found for theme" notification that omarchy theme set and omarchy theme bg next already send. The theme and Plymouth switchers always have previews to show, and they pass the 3 through unchanged.

This stands on its own. #7320 fixes the same empty-list problem in omarchy-menu-select and omarchy-menu-file (transcode and the retro game installer), and it also uses 3 for "nothing to offer". Neither pull request needs the other.

One consequence: exit 3 means no row the picker could show. If a theme's only background is a video ffmpegthumbnailer rejects, or an image vipsthumbnail fails on, the notification says no background was found even though a file exists. Before, the same theme opened the invisible picker. #16803 rewrites omarchy-theme-bg-switcher, so whichever of the two lands second needs a rebase. #17442 also changes how omarchy-menu-images opens the picker.

🤖 Generated by Opus 5.5 in Claude Code. Reviewed by Codex Medium and muse-wonder High.

dhh and others added 2 commits November 11, 2026 22:55
plugin remove only checked that the plugins folder exists, and removing the last plugin leaves the folder, so gum choose got no options and the command ended on "cancelled". It now collects the list first and says there are no plugins installed, and a folder it cannot read says so rather than ending silently under pipefail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A theme with only colors.toml has no backgrounds, and menu-images opened the image picker on no rows. The picker reveals itself on its first preview, so it never appeared but held the keyboard until Escape. menu-images now exits 3 when it has nothing to offer, after the preload branch so the shell's cached copy is still refreshed, and the switcher sends the "No background was found for theme" notification that theme set and bg next already send.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

The PR stops two pickers from opening without choices.

  • Background switching reports when no images can be picked.
  • Plugin removal says when there is nothing to choose.

No actionable issues were found. Tests were not run during this review.

Acknowledged behavior: omarchybot states that failed thumbnail conversions can also produce the “No background was found” notification even when a media file exists. This is intentional in this PR.

Reviews (1) · Last reviewed commit: "Tell the background switcher's user ther..." · Reviewed by Greptile

@omarchybot
omarchybot merged commit e6dbc04 into quattro Nov 16, 2026
3 checks passed
@omarchybot
omarchybot deleted the empty-picker-messages branch November 16, 2026 07:46
omarchybot added a commit to pucedoteth/omarchy that referenced this pull request Nov 16, 2026
omacom#18561 added a background switcher test at the same spot in test/shell.d/menu-images-test.sh as this branch's glob filename test. Both are kept: quattro's first, where it sits on quattro, then the glob filename test, which starts from an empty cache and has to finish before the gated stub that follows.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.

2 participants