Skip to content

Let omarchy update also update plugins, as an opt-in toggle, and let one plugin be held back - #18868

Open
felipecpaiva wants to merge 2 commits into
omacom:quattrofrom
felipecpaiva:update-plugins-opt-in
Open

felipecpaiva wants to merge 2 commits into
omacom:quattrofrom
felipecpaiva:update-plugins-opt-in

Conversation

@felipecpaiva

@felipecpaiva felipecpaiva commented Nov 14, 2026 •

Copy link
Copy Markdown

omarchy update never touches third-party plugins.
So they go stale unless you remember omarchy plugin update.

This adds it as an opt-in. Default is off, so nothing changes for anyone who does not turn it on.

omarchy-toggle update-plugins on

Discussion and the 7 earlier asks behind it: #18867

What it does

  • When the update-plugins toggle is on, omarchy update runs omarchy-plugin-update right before it restarts the shell.
  • The shell restart comes after it, so the new plugin code is what loads. (This is the part that bit me: Spaces pulled 1.8.0 and the bar kept running 1.6.0 until a restart.)
  • A normal update keeps the diff and the confirm step for each plugin. -y passes --yes, same as it already does for the other steps.
  • A plugin that fails prints a warning with the retry command. The rest of the update finishes.

Why opt-in

On #10021, @nickwarters pointed out that plugins are third-party code that runs inside the shell. An automatic update installs whatever the plugin repo has now.
I agree with that, so IMO this should never be the default. The toggle uses the existing omarchy-toggle flag file, no new setting type.

Hold one plugin back (second commit)

The toggle is all or nothing. Today I needed every plugin to update except one that I patched locally. So:

omarchy plugin hold acme.weather
omarchy plugin unhold acme.weather
  • A held plugin is skipped by omarchy plugin update with no id, so also by the opt-in step above. It prints acme.weather is held back; run: omarchy plugin unhold acme.weather.
  • omarchy plugin update acme.weather still updates it, because you named it.
  • The hold is a flag file in ~/.local/state/omarchy/plugins/held/, the same idea as the toggles.

It also helps when a new plugin version is broken, or when you work on a plugin in place.

Changes

  • bin/omarchy-update: the opt-in step, 13 lines.
  • test/shell.d/update-sequence-test.sh: 4 new cases (off by default, -y approves, a normal update reviews, a failure still finishes the update). I checked that they fail on quattro without this change.
  • manual/30-updates.md, manual/32-shell-plugins.md, docs/update-process.md: how to turn it on and where it sits in the flow.
  • bin/omarchy-plugin-hold, bin/omarchy-plugin-unhold: new, about 25 lines each. bin/omarchy-plugin-update: skips held plugins when no id is given.
  • test/shell.d/plugin-hold-test.sh: 5 cases (hold records it, update skips it and says so, update by name still works, unhold, a bad id is refused). The skip case fails without the change.

Tests

  • bash test/shell.d/update-sequence-test.sh: all pass.
  • ./test/cli: all pass (run for the first commit).
  • bash test/shell.d/plugin-hold-test.sh: all pass.

Related PRs that took other routes: #7136 (always on in omarchy update), #6777 and #10248 (menu entries). This one only adds the opt-in, so it does not conflict with a menu entry later.

@greptile-apps

greptile-apps Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 4/5 · Do not merge yet: held plugins can still update when their folder name differs from their id.RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The PR adds optional plugin updates to the system-update workflow.

Do not merge yet: held plugins can still update when their folder name differs from their id.

Findings

  1. P1 Held plugins can still update ▶
  2. P2 Plugin warning stays English ▶
  3. P2 Failed holds report success ▶

Summary

Adds opt-in plugin updates to omarchy update and commands to hold or release individual plugins.

  • Omarchy updates can refresh plugins when users opt in.
  • Users can hold one plugin out of bulk updates.

Reviews (3) · Last reviewed commit: "Let one plugin be held back from updates..." · Reviewed by Greptile

@felipecpaiva felipecpaiva changed the title Let omarchy update also update plugins, as an opt-in toggle Let omarchy update also update plugins, as an opt-in toggle, and let one plugin be held back Nov 14, 2026
Comment thread bin/omarchy-plugin-update
Comment on lines +119 to +120
plugin=$(basename "$dir")
if [[ -f $HELD_DIR/$plugin ]]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Held plugins can still update

The hold check uses the folder name instead of the manifest's id. A manually installed git plugin can live in different-folder while the shell lists it as acme.same; existing tests cover this layout. Running omarchy plugin hold acme.same reports success, but bulk updates still fetch and update that plugin. An unattended update can therefore replace code the user asked to keep unchanged. Read the manifest's id when checking whether a plugin is held.

Comment thread bin/omarchy-plugin-hold
[[ $id =~ ^[A-Za-z0-9][A-Za-z0-9._-]*$ && $id != *..* ]] || fail "invalid plugin id '$id'"

held_dir="$HOME/.local/state/omarchy/plugins/held"
mkdir -p "$held_dir" && : >"$held_dir/$id"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Failed holds report success

If mkdir -p fails, Bash skips the file write but continues to the success message because the failed command is on the left of &&. The command then exits successfully without saving the hold, so later bulk updates can still change the plugin. Run directory creation and the file write as separate commands, or explicitly fail when either fails.

Suggested change
mkdir -p "$held_dir" && : >"$held_dir/$id"
mkdir -p "$held_dir"
: >"$held_dir/$id"

@omarchybot omarchybot added the enhancement New feature or request label Nov 17, 2026
Plugins are third-party code, so the update leaves them alone unless the
update-plugins toggle is on. They update before the shell restart, so the
restart loads the new plugin code. -y approves each change, and a failed
plugin warns without failing the system update.
Comment thread bin/omarchy-update
plugin_update_args=()
fi
if ! omarchy-plugin-update "${plugin_update_args[@]}"; then
echo -e "\e[33m\nSome plugins could not be updated. Review the errors above and run 'omarchy plugin update' to retry.\e[0m" >&2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Plugin warning stays English

The new plugin failure warning prints English directly. The repository requires warnings from omarchy update to use omarchy-i18n, so users receive them in their chosen language. Add an English catalog entry and print it through that helper. This repository requirement must be satisfied before merging.

File Used: docs/i18n.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants