29 Commits

Author SHA1 Message Date
David Heinemeier Hansson
e0edb8c660 Restart Waybar so update-available icon does not hang around
Co-authored-by: @LeonardoTrapani
Closes #541
2025-08-11 16:58:01 +02:00
David Heinemeier Hansson
d9d847fd71 Break-out omarchy-update so we can update each step independently and have changes apply to the active update 2025-08-10 20:23:29 +02:00
David Heinemeier Hansson
a5dacd5c1d We need relaunches or reboots 2025-08-10 20:14:41 +02:00
David Heinemeier Hansson
8d20626534 Better spacing 2025-08-10 20:12:20 +02:00
David Heinemeier Hansson
7e4da388bf Be brief (then message will also fit in the window!) 2025-08-10 20:04:22 +02:00
Ryan Hughes
b2eb1b08a4
Add ~/.local/share/omarchy/bin to systemwide PATH (#602)
* Add omarchy to system path

* Remove unnecessary duplicate

* Remove path def since it's global now

* Migration for system-wide path

* Remove debug code

* Refresh after update

* Add common state script

* Restart on state detected

* Set state instead

* Export own path for menu
2025-08-10 19:58:44 +02:00
David Heinemeier Hansson
9d561fe34d Use a headline to explain what is already up to date 2025-08-08 18:07:22 +02:00
David Heinemeier Hansson
567b05c489 Use present_terminal in omarchy-menu to do fancy command presentation
Then the individual commands can be clean
2025-08-08 15:08:27 +02:00
David Heinemeier Hansson
8170cb9ed4 Unified done showing and command style 2025-08-04 20:51:43 +02:00
David Heinemeier Hansson
62975f0a23 Prepare for use in the new menu system 2025-08-04 18:26:08 +02:00
David Heinemeier Hansson
e923be3f0b Split omarchy-migrate into its own command
So it can be updated independently and apply quicker
2025-08-02 22:07:42 +02:00
David Heinemeier Hansson
f729004306
Show indicator if update is available (#456)
* Show indicator if update is available

* Language
2025-08-02 21:48:06 +02:00
David Heinemeier Hansson
34f24cb38a Offer to reboot after Linux kernel has been updated
Closes #377
2025-08-02 14:26:08 +02:00
David Heinemeier Hansson
74552b9f6e Just use set -e instead of manually checking for return values 2025-07-30 18:43:10 +02:00
Andy Davis
49c154cb1f
Track migrations via state files to avoid running migrations that have already been performed. (#411) 2025-07-30 18:40:59 +02:00
David Heinemeier Hansson
f0a9271506 Correct the order 2025-07-22 19:09:09 -04:00
David Heinemeier Hansson
faaf672eb4 Alert that we are updating system packages 2025-07-22 19:08:41 -04:00
David Heinemeier Hansson
3415fef297 Go back to just always updating system packages
Otherwise we can't depend on having the same minimum versions
2025-07-20 21:24:10 -05:00
Richard Macklin
f81983ec50
Fix detection of "new migrations" in omarchy-update (#219)
Previously, `omarchy-update` used the timestamp of the most recent git
commit to determine which migrations are "new" and should be executed.

Unfortunately, that strategy can (and did) fail in certain scenarios. If
a migration was generated at time T1 but not merged until time T3, and
meanwhile omarchy's `master` branch was updated to a new release with
commit timestamp T2 (where T1 < T2 < T3), then anyone who runs
`omarchy-update` between T2 and T3 would end up with `last_updated_at`
equal to T2; thus, on their next `omarchy-update` it would fail to
detect the migration with timestamp T1 as a "new" migration that should
be executed.

This commit changes the strategy for detecting "new" migrations to avoid
that problem. Rather than recording the most recent commit's timestamp,
we record its SHA. Then, after pulling the new changes, we can leverage
`git diff --name-only --diff-filter=A $SHA.. migrations/*.sh`
to return precisely the list of migration files that were introduced by
our `git pull`. It doesn't matter if any of those migrations have a
timestamp that was earlier than the timestamp of the commit we started
on - we will always execute *every* migration that didn't exist before
our `git pull`!
2025-07-20 17:55:22 -05:00
Richard Macklin
4bb8afde02 Reset any stash changes before proceeding if there were conflicts
If the worktree has conflicts after applying the user's changes from the
autostash, we should reset them before proceeding to ensure we are in
a working state. When there are conflicts, git still keeps the stash
entry, so the user will still be able to manually re-pop the stash and
resolve the conflicts after `omarchy-update` has finished.

In the case of conflicts, the output will look something like this (I've
omitted most of the normal `git pull` output, hence the `[...]`):

```
Updating 729cd6a..45b5d3e
Created autostash: 91853c4
Fast-forward
 bin/omarchy                                                                |  10 +++++++---
 [...]
 create mode 100644 themes/tokyo-night/backgrounds/2--Milad-Fakurian-Abstract-Purple-Blue.jpg
Applying autostash resulted in conflicts.
Your changes are safe in the stash.
You can run "git stash pop" or "git stash drop" at any time.
bin/omarchy:65: leftover conflict marker
```

before proceeding with the rest of the `omarchy-update` script from a
clean state. So the user will see 1) that there were conflicts when
applying the autostashed changes, 2) that their changes are still safe
in the stash, and 3) which files (and lines) had conflict markers.
2025-07-17 23:06:25 -07:00
Richard Macklin
cc0ac314ef Use git pull --autostash in omarchy-update
This is a minor follow-up to dcc40719793d52d43698108a0b0784c2f3b48655
to leverage the `--autostash` flag of `git pull` which does the same
thing we were doing in three separate commands.

This also avoids the possibility of popping something from the stash
that `omarchy-update` didn't actually stash. In other words, if the
initial `git stash` was a no-op (because there were no changes in the
working tree), it's actually not desirable for `omarchy-update` to
`git stash pop` at the end, since that potentially pops something the
user had manually stashed (we only want `omarchy-update` to pop its own
stash entry). Using `--autostash` handles this correctly.

Ref:
https://git-scm.com/docs/git-pull#Documentation/git-pull.txt---autostash
2025-07-17 19:13:35 -07:00
David Heinemeier Hansson
25459cb539 Confirm before updating system packages 2025-07-17 09:39:42 -07:00
David Heinemeier Hansson
dcc4071979 Stash/pop any local changes before pulling updates
More user customizations will survive without commits.
2025-07-17 09:39:31 -07:00
David Heinemeier Hansson
55f30eba66 No need to confirm the upgrade 2025-07-09 19:49:10 -07:00
David Heinemeier Hansson
8fb9b51d03 Update system packages when updating omarchy 2025-07-09 18:33:06 -07:00
David Heinemeier Hansson
e7766926d9 Make it easier to read 2025-07-09 19:12:26 -04:00
David Heinemeier Hansson
dedc08a76e Allow you to easily run all migrations by passing "all"
Helpful for testing or if something went wrong
2025-06-29 12:49:51 -07:00
David Heinemeier Hansson
2a2a77685c Add migration system and fix bluetooth service + missing bat 2025-06-28 11:46:28 -07:00
David Heinemeier Hansson
55a3130218 Update Omarchy via git pull 2025-06-25 16:47:23 -07:00