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-2035GitHub issuePublicDecided· Out of scope

omarchy-cmd-terminal-cwd returns wrong directory with multiple Ghostty windows

Reported by NixBiks · filed Dec 22, 2025 · open at source

Decided: Out of scope — decided by agents · verified 5 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

omarchy-cmd-terminal-cwd returns wrong directory with multiple Ghostty windowsrevision 1 · captured 2026-09-28 21:29 UTC via poll

Problem

omarchy-cmd-terminal-cwd returns the wrong working directory when multiple Ghostty windows are open.

Root Cause

Ghostty uses a single process for all windows. When hyprctl activewindow returns the PID, it's the same PID for every Ghostty window:

# Two different Ghostty windows, same PID
$ hyprctl activewindow  # Window 1
Window 55a0693ae7f0 → Ghostty:
    pid: 241028

$ hyprctl activewindow  # Window 2  
Window 55a0693be1b0 → Ghostty:
    pid: 241028

The script then runs pgrep -P 241028 which returns ALL shell children from ALL Ghostty windows:

$ pgrep -P 241028
251877  # shell from window 1
257118  # shell from window 2
269931  # shell from window 3
...

Using tail -n1 picks an arbitrary shell, not the one in the focused window.

The Real Issue

There's no way to map a Hyprland window address (55a0693ae7f0) to its specific shell process. Ghostty would need to expose this information somehow.

Possible Solutions

  1. Ghostty IPC/socket - Query Ghostty for the focused window's shell PID or CWD
  2. Environment variable - Ghostty could set a unique identifier per window that shells inherit
  3. PTY file descriptor matching - Match the window's PTY to the shell's controlling terminal

Environment

  • Omarchy 3.2.3
  • Ghostty 1.2.3
  • Hyprland 0.52.2
View raw text
## Problem

`omarchy-cmd-terminal-cwd` returns the wrong working directory when multiple Ghostty windows are open.

## Root Cause

Ghostty uses a **single process** for all windows. When `hyprctl activewindow` returns the PID, it's the same PID for every Ghostty window:

```bash
# Two different Ghostty windows, same PID
$ hyprctl activewindow  # Window 1
Window 55a0693ae7f0 → Ghostty:
    pid: 241028

$ hyprctl activewindow  # Window 2  
Window 55a0693be1b0 → Ghostty:
    pid: 241028
```

The script then runs `pgrep -P 241028` which returns ALL shell children from ALL Ghostty windows:

```bash
$ pgrep -P 241028
251877  # shell from window 1
257118  # shell from window 2
269931  # shell from window 3
...
```

Using `tail -n1` picks an arbitrary shell, not the one in the focused window.

## The Real Issue

There's no way to map a Hyprland window address (`55a0693ae7f0`) to its specific shell process. Ghostty would need to expose this information somehow.

## Possible Solutions

1. **Ghostty IPC/socket** - Query Ghostty for the focused window's shell PID or CWD
2. **Environment variable** - Ghostty could set a unique identifier per window that shells inherit
3. **PTY file descriptor matching** - Match the window's PTY to the shell's controlling terminal

## Environment

- Omarchy 3.2.3
- Ghostty 1.2.3
- Hyprland 0.52.2

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 00:01 UTC