Proof Portal
Omarchy
ProbeLabs65 findings · 95 requirementsA 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.
omarchy-hook always runs .d hook scripts with bash, breaking non-bash hooks despite correct shebang + exec bit
Reported by DookyShooz · filed Sep 2, 2026Closed upstream on 2026-09-21 by bjarneo via an automated message, as a duplicate of #8492 (R-1395). GitHub close reason: completed.
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?
- Not yet mapped to any requirement or component.
- 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?
- Our staff decide whether the report is valid. Where this project allows it, agents decide whether it duplicates another report or a known issue. No decision has been recorded yet.
Original report
What happened
A theme-set.d hook script written in Python (#!/usr/bin/env python3 shebang, executable via chmod +x) fails every time a theme is applied. The errors are bash trying to parse Python syntax as shell commands — e.g. import sys resolves to ImageMagick's import binary and fails with "unable to grab mouse", from pathlib import Path fails with "from: command not found", and the script dies on the first real assignment with a syntax error.
Root cause/usr/share/omarchy/bin/omarchy-hook invokes every file in <hook>.d/ unconditionally with bash "$hook" "$@", regardless of the file's shebang or executable bit:
if [[ -d $HOOK_DIR ]]; then
for hook in "$HOOK_DIR"/*; do
[[ -f $hook ]] || continue
[[ $hook == *.sample ]] && continue
bash "$hook" "$@" || echo "Hook failed: $hook"
done
fiThis silently discards the shebang, so any hook not written in bash (Python, in this case) is unusable even though it's installed exactly as hooks.md describes (executable, in the right .d directory).
Expected
An executable hook script with a valid shebang should be invoked directly ("$hook" "$@"), letting the kernel/shebang pick the interpreter — falling back to bash "$hook" only for non-executable files, matching how omarchy hook install already makes scripts executable.
Steps to reproduce
1. Create ~/.config/omarchy/hooks/theme-set.d/test-hook.py:
#!/usr/bin/env python3
print("hello from python")chmod +x ~/.config/omarchy/hooks/theme-set.d/test-hook.pyomarchy theme set <any-theme>oromarchy-hook theme-set <slug>- Observe bash errors instead of
hello from python.
This is not theme-specific — it reproduces on every theme switch, for any theme, since the runner never inspects the theme at all before dispatching the hook.
System
- Omarchy version: 4.0.2-1 (stable channel)
- Kernel: Linux 7.1.9-arch1-2 x86_64
- GPU: NVIDIA GeForce RTX 3060 (GA106)
Note: omarchy debug --no-sudo --print from the current docs doesn't exist on this installed version (omarchy commands --all has no debug group), so I couldn't attach the standard diagnostic log — worth checking if that command was renamed/removed since 4.0.2-1.
View raw text
**What happened**
A `theme-set.d` hook script written in Python (`#!/usr/bin/env python3` shebang, executable via `chmod +x`) fails every time a theme is applied. The errors are bash trying to parse Python syntax as shell commands — e.g. `import sys` resolves to ImageMagick's `import` binary and fails with "unable to grab mouse", `from pathlib import Path` fails with "from: command not found", and the script dies on the first real assignment with a syntax error.
**Root cause**
`/usr/share/omarchy/bin/omarchy-hook` invokes every file in `<hook>.d/` unconditionally with `bash "$hook" "$@"`, regardless of the file's shebang or executable bit:
```bash
if [[ -d $HOOK_DIR ]]; then
for hook in "$HOOK_DIR"/*; do
[[ -f $hook ]] || continue
[[ $hook == *.sample ]] && continue
bash "$hook" "$@" || echo "Hook failed: $hook"
done
fi
```
This silently discards the shebang, so any hook not written in bash (Python, in this case) is unusable even though it's installed exactly as `hooks.md` describes (executable, in the right `.d` directory).
**Expected**
An executable hook script with a valid shebang should be invoked directly (`"$hook" "$@"`), letting the kernel/shebang pick the interpreter — falling back to `bash "$hook"` only for non-executable files, matching how `omarchy hook install` already makes scripts executable.
**Steps to reproduce**
1. Create `~/.config/omarchy/hooks/theme-set.d/test-hook.py`:
```python
#!/usr/bin/env python3
print("hello from python")
```
2. `chmod +x ~/.config/omarchy/hooks/theme-set.d/test-hook.py`
3. `omarchy theme set <any-theme>` or `omarchy-hook theme-set <slug>`
4. Observe bash errors instead of `hello from python`.
This is not theme-specific — it reproduces on every theme switch, for any theme, since the runner never inspects the theme at all before dispatching the hook.
**System**
- Omarchy version: 4.0.2-1 (stable channel)
- Kernel: Linux 7.1.9-arch1-2 x86_64
- GPU: NVIDIA GeForce RTX 3060 (GA106)
**Note:** `omarchy debug --no-sudo --print` from the current docs doesn't exist on this installed version (`omarchy commands --all` has no `debug` group), so I couldn't attach the standard diagnostic log — worth checking if that command was renamed/removed since 4.0.2-1.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.
No decision has been recorded yet.