Proof Portal

Project overview

Omarchy

ProbeLabs65 findings · 95 requirements

A proof layer — requirements, tests and verified fixes — for two of Omarchy's subsystems: the application menu (launcher scripts, QML model, JSONC config, search and selection) and the lock screen (lock scripts, QML, PAM authentication). Scope is deliberately limited to those components of omacom/omarchy; the rest of the distribution is not covered.

Inbox
ReportR-1199GitHub issuePublicDecided· Out of scope

theme set silently breaks theming when a user theme's colors.toml is a relative symlink

Reported by andersmar · filed Aug 30, 2026 · open at source

Decided: Out of scope — decided by agents · verified 4 days ago.

At a glance

1 · What is claimed?
Only the report text below — no validator has restated it as checkable claims yet.
2 · What does it affect?
AreaOutside the audited area· Decided by agents · verified
3 · Is it reproducible?
No validation has been run yet.
4 · What remains unclear?
  • Not validated yet: no claims, no reproducer.
5 · What happens next?
Decided by agents and verified by a second, independent agent — see the decision.

Original report

theme set silently breaks theming when a user theme's colors.toml is a relative symlinkrevision 1 · captured 2026-09-28 21:24 UTC via poll

Omarchy version: 4.0.1-1

What happened

omarchy theme set <name> staged a user theme (~/.config/omarchy/themes/<name>/) whose colors.toml is a relative symlink (e.g. pointing into a dotfiles repo: ../../../../dev/dotfiles/omarchy/.config/omarchy/themes/<name>/colors.toml). The result was silent, wide breakage:

  • ~/.local/state/omarchy/current/theme/colors.toml ended up a dangling symlink (relative path resolved from the wrong directory depth).
  • Because that file couldn't be read, omarchy-theme-set-templates produced no themed configs at all — no ghostty.conf, no shell.toml bar colors/opacity, etc.
  • The top bar lost its themed color/opacity, the terminal (ghostty) lost its color scheme, and any app reading the live state path directly (e.g. third-party apps that sync to ~/.local/state/omarchy/current/theme/colors.toml) got nothing.
  • No error or warning was printed anywhere in this pipeline — it looked like the theme had applied successfully.

Root cause

In omarchy-theme-set, staging a non-repo user theme does:

cp -r "$USER_THEMES_PATH/$THEME_NAME/"* "$NEXT_THEME_PATH/" 2>/dev/null

cp -r copies a symlink as a symlink (doesn't dereference) verbatim. A relative symlink's target is only correct relative to its original directory. Once copied into next-theme/ (and later swapped into current/theme/), the same relative path text resolves to a different, wrong location — dangling.

stage_installed_theme/is_denied_installed_file do handle symlinks specially for installed (git-cloned) themes, but that path isn't taken for a hand-authored user theme, so the plain cp -r above is what actually runs and hits this.

Steps to reproduce

mkdir -p ~/realtheme
cat > ~/realtheme/colors.toml <<'TOML'
mode = "dark"
accent = "#89b4fa"
background = "#1e1e2e"
foreground = "#cdd6f4"
TOML

mkdir -p ~/.config/omarchy/themes/reprotheme
ln -s ../../../../realtheme/colors.toml ~/.config/omarchy/themes/reprotheme/colors.toml

omarchy theme set reprotheme

# Now check:
stat ~/.local/state/omarchy/current/theme/colors.toml   # -> dangling symlink
ls ~/.local/state/omarchy/current/theme/ghostty.conf     # -> missing

Expected

Either:
1. cp -rL (dereference symlinks) when staging a user theme's files, so the content is copied rather than a potentially-invalid symlink, or
2. Validate after staging that colors.toml (and other staged files) actually resolve, and surface a clear error/warning instead of silently continuing with a broken theme.

Workaround

Using an absolute symlink instead of a relative one for colors.toml avoids the bug, since cp -r's verbatim copy then still resolves correctly regardless of destination depth. This is a viable workaround for anyone symlinking theme files in from a dotfiles repo, but the silent failure mode for anyone hitting this without knowing the cause is bad — no error anywhere in the pipeline.

View raw text
**Omarchy version:** 4.0.1-1

## What happened

`omarchy theme set <name>` staged a user theme (`~/.config/omarchy/themes/<name>/`) whose `colors.toml` is a **relative symlink** (e.g. pointing into a dotfiles repo: `../../../../dev/dotfiles/omarchy/.config/omarchy/themes/<name>/colors.toml`). The result was silent, wide breakage:

- `~/.local/state/omarchy/current/theme/colors.toml` ended up a **dangling symlink** (relative path resolved from the wrong directory depth).
- Because that file couldn't be read, `omarchy-theme-set-templates` produced **no themed configs at all** — no `ghostty.conf`, no `shell.toml` bar colors/opacity, etc.
- The top bar lost its themed color/opacity, the terminal (ghostty) lost its color scheme, and any app reading the live state path directly (e.g. third-party apps that sync to `~/.local/state/omarchy/current/theme/colors.toml`) got nothing.
- No error or warning was printed anywhere in this pipeline — it looked like the theme had applied successfully.

## Root cause

In `omarchy-theme-set`, staging a non-repo user theme does:

```bash
cp -r "$USER_THEMES_PATH/$THEME_NAME/"* "$NEXT_THEME_PATH/" 2>/dev/null
```

`cp -r` copies a symlink **as a symlink** (doesn't dereference) verbatim. A *relative* symlink's target is only correct relative to its original directory. Once copied into `next-theme/` (and later swapped into `current/theme/`), the same relative path text resolves to a different, wrong location — dangling.

`stage_installed_theme`/`is_denied_installed_file` do handle symlinks specially for *installed* (git-cloned) themes, but that path isn't taken for a hand-authored user theme, so the plain `cp -r` above is what actually runs and hits this.

## Steps to reproduce

```bash
mkdir -p ~/realtheme
cat > ~/realtheme/colors.toml <<'TOML'
mode = "dark"
accent = "#89b4fa"
background = "#1e1e2e"
foreground = "#cdd6f4"
TOML

mkdir -p ~/.config/omarchy/themes/reprotheme
ln -s ../../../../realtheme/colors.toml ~/.config/omarchy/themes/reprotheme/colors.toml

omarchy theme set reprotheme

# Now check:
stat ~/.local/state/omarchy/current/theme/colors.toml   # -> dangling symlink
ls ~/.local/state/omarchy/current/theme/ghostty.conf     # -> missing
```

## Expected

Either:
1. `cp -rL` (dereference symlinks) when staging a user theme's files, so the *content* is copied rather than a potentially-invalid symlink, or
2. Validate after staging that `colors.toml` (and other staged files) actually resolve, and surface a clear error/warning instead of silently continuing with a broken theme.

## Workaround

Using an **absolute** symlink instead of a relative one for `colors.toml` avoids the bug, since `cp -r`'s verbatim copy then still resolves correctly regardless of destination depth. This is a viable workaround for anyone symlinking theme files in from a dotfiles repo, but the silent failure mode for anyone hitting this without knowing the cause is bad — no error anywhere in the pipeline.

Validation

Not checked yet. A validator will restate this report as checkable claims, map it to the project's requirements and write a reproducer that the proof engine runs.

Linked

Not linked to any known issue, other report or change yet.

Decision

Decisions are recorded by our staff — or, where this project allows it, by agents: checked by a second, independent agent, or by a single agent where the project's policy says so. Any decision reached so far is shown below.

  • Out of scopeDecided by agents · verified · 2026-10-09 10:11 UTC