Skip to content

Add ~/.local/share/omarchy/bin to systemwide PATH - #602

Merged
dhh merged 10 commits into
omacom:devfrom
ryanrhughes:add-omarchy-to-system-path
Aug 10, 2025
Merged

dhh merged 10 commits into
omacom:devfrom
ryanrhughes:add-omarchy-to-system-path

Conversation

@ryanrhughes

Copy link
Copy Markdown
Collaborator

Adds to the system path via UWSM. Also tested adding via proflile.d but that didn't get picked up everywhere, particularly by Walker whereas this does.

screenshot-2025-08-10_01-43-23 image

Fixes #557

Comment thread bin/omarchy-menu Resolved
Comment thread migrations/1754680295.sh Resolved
@ryanrhughes
ryanrhughes force-pushed the add-omarchy-to-system-path branch from 602d1f2 to 4bd7b31 Compare August 10, 2025 12:56
@dhh

dhh commented Aug 10, 2025

Copy link
Copy Markdown
Contributor

Now question is if this happens as part of a larger upgrade that has later migrations? I guess you'll be able to run those migrations with an update later, but might need the system in a half-finished state along the way. Hmm!

@ryanrhughes

Copy link
Copy Markdown
Collaborator Author

Yeah..don't like that. How do you feel about adding some logic to the migration script so we could just drop a little state file of sorts like needs-relaunch in individual migrations and check for at the end to trigger prompting the user?

@dhh

dhh commented Aug 10, 2025

Copy link
Copy Markdown
Contributor

I like that idea! Gotta make it lightweight, but I like it. We ask for restarts at the end when new kernels are detected. Should do it around the same time.

@dhh

dhh commented Aug 10, 2025

Copy link
Copy Markdown
Contributor

Question still is, though, that if we change this now, then later migrations that depend on the PATH, might fail in the same upgrade session? Wonder if there's any clutch we can do for the PATH munging in the omarchy-menu or omarchy-update script to make it work either way?

@dhh

dhh commented Aug 10, 2025

Copy link
Copy Markdown
Contributor

Yeah, I think solution is for omarchy-menu to look at PATH and add it's own bin dir if not present. Then anything started by omarchy-menu should have the right path? Even if uwsm hasn't been reloaded yet?

@ryanrhughes

Copy link
Copy Markdown
Collaborator Author

I thought about that a touch but couldn't come up with a viable scenario this could happen.

If you run update and get the updated version of the menu where the path var is gone, you will also have had to run the migration for this already.

Migration processes execute in the user env where we already have omarchy/bin as a part of the path and is done via sourcing the files which should keep us in the same terminal where the $PATH was set before we removed it from the defaults. However, I'll confirm this with some fake test migrations while working in the refresh / restart drop in.

The only scenarios I could think of that could arise aside from this are:

  • If you did a manual git pull on dev but at that point, there are likely other problems you'll encounter as well not running migrations. Entirely possible I'm overlooking an obvious situation here though.
  • If you deny restarting, but then try to use the menu at which point; we warned you. 🤷‍♂

Is there another you can think of playing out that I'm not thinking about I can test as well?

@ryanrhughes

ryanrhughes commented Aug 10, 2025 •

Copy link
Copy Markdown
Collaborator Author

Added a simple state set / clear script with some checks at the end of the update. We detect in order from most aggressive to least so if we need to restart, who cares about the relaunch. Restart clears both states.

Now in future migrations, we can just drop omarchy-state set <restart-required | relaunch-required> and be good

Thinking further about the downstream, runs; I think we will have a problem since the update script launches a terminal from the menu with a different path than the user has, and is the exact reason we're going down this path in the first place.

Your idea of exporting the path in the menu seems to solve this. I just added it as a simple export since it does no harm if it doubles up.

Should we flag this to be removed at some point later or just aim to keep it around forever?

@dhh

dhh commented Aug 10, 2025

Copy link
Copy Markdown
Contributor

One thing I just realized is that this won't ask for a restart on the first run, because it'll be running an old version of install.sh, which doesn't have that logic.

@ryanrhughes

Copy link
Copy Markdown
Collaborator Author

I was going to suggest moving the checking logic into the omarchy-migrate so that the omarchy-update is effectively as dumb as possible but I'm looking at how you have these split out and like that as well. Effectively same thinking. Make omarchy-update have no logic because we can't update that one before we start running.

@dhh

dhh commented Aug 11, 2025

Copy link
Copy Markdown
Contributor

We'll still possibly have a problem on the first run. But I'll test that.

marcinczenko pushed a commit to marcinczenko/omarchy that referenced this pull request Sep 23, 2025
* 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
ericjim added a commit to ericjim/omarchy that referenced this pull request Sep 27, 2025
- Add GitHub link to xpadneo project
- Include references to confirmed fixes (Bazzite omacom#602, EndeavourOS forums)
- Explain specific issues the driver resolves based on user reports
- Provide transparency about what's being installed and why
DanteCpp pushed a commit to DanteCpp/omarchy that referenced this pull request Oct 16, 2026
Migrate Macs from a verified download of omarchy-mac-boot, handing files over inside the transaction
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.

4 participants