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 default editor <gui-editor> does not update XDG MIME defaults, so GUI-opened files still launch nvim
Reported by brink-lab · filed Aug 22, 2026Closed upstream on 2026-09-21 by bjarneo via an automated message, as a duplicate of #7299 (R-1714). 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
After running omarchy default editor code, files opened via the file manager / xdg-open still open in nvim. Omarchy's own launcher (omarchy-launch-editor, $EDITOR, keybindings) correctly opens VSCode, so the setting appears to work — but anything routed through the XDG MIME database ignores it.
Expected behavior
Setting a default editor should make text files open in that editor regardless of how they're opened (terminal and GUI/xdg-open).
Steps to reproduce
- On a fresh Omarchy install (nvim is fallback default):
omarchy default editor code - Verify Omarchy's state is correct:
cat ~/.local/state/omarchy/defaults/editor→code - Check the XDG layer:
xdg-mime query default text/plain→nvim.desktop - Open any
.txtfrom the file manager → opens in nvim in a terminal
Root cause
/usr/bin/omarchy-default-editoronly writes~/.local/state/omarchy/defaults/editor; it never touchesmimeapps.list- User's
~/.config/mimeapps.listhas notext/plainentry, so XDG falls back to scanning.desktopclaims - Arch's
code.desktopdeclares onlyapplication/x-code-workspace(notext/*types), whilenvim.desktopdeclares a broad list oftext/*types — so nvim wins the fallback for all text files omarchy-launch-editorcorrectly reads the state file (falls back tonvimonly when absent), which masks the problem for terminal-side editing
Proposed fix
In omarchy-default-editor, after writing the state file, also set the XDG default by resolving each editor's desktop file, e.g.:
case "$editor" in
code) desktop="code.desktop" ;;
cursor) desktop="cursor.desktop" ;;
zed) desktop="dev.zed.Zed.desktop" ;;
sublime_text) desktop="sublime_text.desktop" ;;
helix) desktop="helix.desktop" ;;
vim|emacs|nvim) desktop="$editor.desktop" ;;
esac
if find ~/.local/share/applications /usr/share/applications -maxdepth 1 -name "$desktop" | grep -q .; then
xdg-mime default "$desktop" \
text/plain application/json application/x-shellscript \
text/markdown text/x-yaml text/x-toml
fiSecondary consideration: upstream VS Code's .desktop ships without text/* MimeType entries. omarchy refresh applications (or a shipped launcher override) could install a corrected code.desktop so VSCode shows up as an "Open With…" candidate too.
System details
- Omarchy: 4.0.0-1
- Kernel: 7.1.8-arch1-3
- CPU: Intel Core i5-3210M
- GPU: Intel HD Graphics 4000
View raw text
## What happened
After running `omarchy default editor code`, files opened via the file manager / `xdg-open` still open in nvim. Omarchy's own launcher (`omarchy-launch-editor`, `$EDITOR`, keybindings) correctly opens VSCode, so the setting appears to work — but anything routed through the XDG MIME database ignores it.
## Expected behavior
Setting a default editor should make text files open in that editor regardless of how they're opened (terminal *and* GUI/xdg-open).
## Steps to reproduce
1. On a fresh Omarchy install (nvim is fallback default): `omarchy default editor code`
2. Verify Omarchy's state is correct: `cat ~/.local/state/omarchy/defaults/editor` → `code`
3. Check the XDG layer: `xdg-mime query default text/plain` → `nvim.desktop`
4. Open any `.txt` from the file manager → opens in nvim in a terminal
## Root cause
- `/usr/bin/omarchy-default-editor` only writes `~/.local/state/omarchy/defaults/editor`; it never touches `mimeapps.list`
- User's `~/.config/mimeapps.list` has no `text/plain` entry, so XDG falls back to scanning `.desktop` claims
- Arch's `code.desktop` declares only `application/x-code-workspace` (no `text/*` types), while `nvim.desktop` declares a broad list of `text/*` types — so nvim wins the fallback for all text files
- `omarchy-launch-editor` correctly reads the state file (falls back to `nvim` only when absent), which masks the problem for terminal-side editing
## Proposed fix
In `omarchy-default-editor`, after writing the state file, also set the XDG default by resolving each editor's desktop file, e.g.:
```bash
case "$editor" in
code) desktop="code.desktop" ;;
cursor) desktop="cursor.desktop" ;;
zed) desktop="dev.zed.Zed.desktop" ;;
sublime_text) desktop="sublime_text.desktop" ;;
helix) desktop="helix.desktop" ;;
vim|emacs|nvim) desktop="$editor.desktop" ;;
esac
if find ~/.local/share/applications /usr/share/applications -maxdepth 1 -name "$desktop" | grep -q .; then
xdg-mime default "$desktop" \
text/plain application/json application/x-shellscript \
text/markdown text/x-yaml text/x-toml
fi
```
Secondary consideration: upstream VS Code's `.desktop` ships without `text/*` MimeType entries. `omarchy refresh applications` (or a shipped launcher override) could install a corrected `code.desktop` so VSCode shows up as an "Open With…" candidate too.
## System details
- Omarchy: 4.0.0-1
- Kernel: 7.1.8-arch1-3
- CPU: Intel Core i5-3210M
- GPU: Intel HD Graphics 4000
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.