Repository navigation
Allow theme deletion from the generic theme picker - #21143
ThePrimeagen wants to merge 2 commits into
Conversation
The standalone theme switcher opens the picker through the generic image-selector path, so themeMode stays false and Delete was silently ignored. Treat a selection from the theme preview directory as a theme for deletion, refresh the extra/stock theme lists on generic opens so they are known on a first open, and reload rows after a deletion in that picker.
…fresh Replace the substring check on currentPath() with an explicit themeDeleteMode flag set from ImagePickerModel.isThemePreviewSource() against the session's theme-selector previews directory: - Only refresh extra/stock theme lists when the generic selector opens theme previews, not on icon or background pickers. - Guard applySelected() during deletion and post-delete refresh in themeDeleteMode so Enter cannot return a just-deleted theme. - Reload rows in updateThemeRows() when themeDeleteMode is active even if currentPath() is empty under a filter or themeRows already matched the post-delete list while imageRows still held the removed theme, and clear awaitingDeleteRefresh once no queued refresh remains. - Add unit tests in test/shell.d/image-picker-test.sh for the generic theme picker delete, apply guard, row refresh, and open flows.
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryAllows Delete in the terminal-opened theme picker without changing how it returns a selection.
|
|
Codex 6.2 Sol High reproduced the missing Delete dialog in the terminal picker on an Omarchy ISO worker, both on The CLI and image-picker checks passed. Four other shell tests failed on the same assertions on
|


Pressing Delete on a user theme in the picker opened by
omarchy-theme-switcherfrom a terminal does nothing: no confirmation dialog appears and the theme stays. The picker opened from the Omarchy menu works, but the terminal script path inbin/omarchy-theme-switchergoes through the generic image selector inshell/plugins/image-picker/ImagePicker.qml, where deletion was silently ignored.Screenshots
Reproduce
mkdir -p ~/.config/omarchy/themes/Mygruv && cp -r /usr/share/omarchy/themes/gruvbox/. ~/.config/omarchy/themes/Mygruv/omarchy-theme-switcherMygruvto filter the picker to that theme.Mygruvlabel and no confirmation dialog appears.More cases
First picker open after restarting the shell
Related