Unify Omarchy migrations

This commit is contained in:
Ryan Hughes
2026-06-12 13:49:46 -04:00
parent 04b0fab64d
commit c582e7133a
27 changed files with 259 additions and 681 deletions
+5 -5
View File
@@ -1,16 +1,16 @@
#!/bin/bash
# omarchy:summary=Notify the user when Omarchy has pending user migrations
# omarchy:summary=Notify the user when Omarchy has pending migrations
set -euo pipefail
pending_migrations=$(omarchy-migrate --pending user 2>/dev/null) || exit 0
pending_migrations=$(omarchy-migrate --pending 2>/dev/null) || exit 0
pending_count=$(printf '%s\n' "$pending_migrations" | sed '/^[[:space:]]*$/d' | wc -l)
if (( pending_count == 1 )); then
message="1 new Omarchy user migration is available. Click to run it in a terminal."
message="1 new Omarchy migration is available. Click to run it in a terminal."
else
message="$pending_count new Omarchy user migrations are available. Click to run them in a terminal."
message="$pending_count new Omarchy migrations are available. Click to run them in a terminal."
fi
notify_command=$(printf 'if [[ -n $(omarchy-notification-send -u critical -g  "Run Omarchy Migrations" %q -a) ]]; then omarchy-launch-floating-terminal-with-presentation omarchy-migrate; fi' "$message")
@@ -21,7 +21,7 @@ if command -v systemd-run >/dev/null 2>&1; then
fi
print_pending_migrations() {
echo "Omarchy has pending user migrations. Run omarchy-migrate in a terminal to apply them:"
echo "Omarchy has pending migrations. Run omarchy-migrate in a terminal to apply them:"
while IFS= read -r migration; do
[[ -n $migration ]] || continue
printf ' %s\n' "$migration"