omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Bash functions broken over SSH: $OMARCHY_PATH not set outside desktop session

Open shawnyeager opened this issue 9 months ago • 2 comments

Summary

After today's update, default/bash/functions fails when logging in via SSH with:

-bash: /default/bash/fns/*: No such file or directory

Cause

Commit f6c7b96e ("Use const path") changed default/bash/functions from:

for f in ~/.local/share/omarchy/default/bash/fns/*; do source "$f"; done

to:

for f in $OMARCHY_PATH/default/bash/fns/*; do source "$f"; done

$OMARCHY_PATH is only exported in uwsm/env, which is sourced by the Hyprland desktop session. SSH sessions never load this, so $OMARCHY_PATH is empty and the glob expands to /default/bash/fns/*.

Suggested fix

Either revert to the hardcoded path, or set a default fallback in default/bash/functions:

for f in ${OMARCHY_PATH:-$HOME/.local/share/omarchy}/default/bash/fns/*; do source "$f"; done

Alternatively, default/bash/shell (sourced before functions) could export the default:

export OMARCHY_PATH="${OMARCHY_PATH:-$HOME/.local/share/omarchy}"

shawnyeager avatar Feb 27 '26 02:02 shawnyeager

Fixed via d0084ff10d95a4dbe498a568d3d3cfc5528459ba, which has been hotpushed to master 👍

dhh avatar Feb 27 '26 07:02 dhh

@dhh - https://github.com/basecamp/omarchy/commit/d0084ff10d95a4dbe498a568d3d3cfc5528459ba adds the variables to envs, but the rc file in the repo sources functions before envs. Sourcing envs at the top of rc should fix it for SSH users. Submitted a PR - hopefully this is helpful. Tak!

alexpgates avatar Feb 27 '26 16:02 alexpgates