From b3195e9e55e185281d4d965333b1ad4ebb2ca6ee Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 19 Jul 2026 15:42:22 -0500 Subject: docs(rules): use gui-open to show Craig visuals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit interaction.md and desktop-capture.md told the agent to launch a viewer with google-chrome-stable ... & or hyprctl dispatch exec "imv ...". Both files already noted the failure mode: a coding-agent shell reaps an ordinary background child after it returns, so the window dies before Craig sees it. gui-open (dotfiles a34d479, on PATH) closes that. It detaches through systemd-run --user so the shell can't reap it, resolves the current Hyprland instance after a compositor restart, and confirms a mapped, visible client before returning. Both files now launch through it — gui-open auto-detects image vs HTML, with --image/--browser to force. The separate-workspace guidance stays. gui-open replaces only the launch, which was the fragile part. Proposed by archsetup after shipping the tool. It's dotfiles-owned, not a rulesets script, so this is guidance only; a machine without it needs a dotfiles pull. --- claude-rules/desktop-capture.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'claude-rules/desktop-capture.md') diff --git a/claude-rules/desktop-capture.md b/claude-rules/desktop-capture.md index 0051c4d..c4a67f9 100644 --- a/claude-rules/desktop-capture.md +++ b/claude-rules/desktop-capture.md @@ -38,9 +38,12 @@ output isn't available; it needs the compositor installed. Open it on a *separate* real workspace and tell them which one, so it never grabs their active workspace. They switch when ready. Craig's viewer preference -is `imv`; launch it through the compositor (`hyprctl dispatch exec "imv -"`) so it survives the agent's shell rather than a bare `&` job that gets -reaped. +is `imv`; launch it with `gui-open --image ` (dotfiles-shipped) rather +than a bare `&` job or `hyprctl dispatch exec`: it detaches through `systemd-run +--user` so the agent shell can't reap it, resolves the current Hyprland instance +after a compositor restart, and confirms the viewer is mapped and visible before +returning. An HTML render uses `gui-open ` (or `--browser`) the same way. +If `gui-open` isn't on PATH, the machine needs a dotfiles pull. ## Always clean up -- cgit v1.2.3