Skip to content

Reload Hyprland resiliently from outside the session - #17420

Merged
dhh merged 5 commits into
quattrofrom
fix-hyprctl-reload-outside-session
Nov 3, 2026
Merged

dhh merged 5 commits into
quattrofrom
fix-hyprctl-reload-outside-session

Conversation

@dhh

@dhh dhh commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Running omarchy update from a remotely started herdr failed on migration 1793667581 (finish Superwhisper setup) with no visible error. The shell had no HYPRLAND_INSTANCE_SIGNATURE, so hyprctl reload >/dev/null in omarchy-install-dictation-superwhisper exited 1. hyprctl prints that error on stdout, so the update just stopped with "Something went wrong during the update!"

$ env -u HYPRLAND_INSTANCE_SIGNATURE hyprctl reload
HYPRLAND_INSTANCE_SIGNATURE not set! (is hyprland running?)
exit=1

Fix

  • omarchy-restart-hyprctl uses hyprctl --instance 0 reload when there's no signature, so it reaches the running Hyprland from ssh or a remote herdr.
  • With no Hyprland running at all, the helper succeeds: there's nothing to reload, and Hyprland reads the saved config when it starts. Callers need no || true.
  • Every hyprctl reload in bin/ now goes through the helper. Shipped migrations are left as they are.

Tests

  • restart-hyprctl-test.sh covers the in-session, outside-session and no-Hyprland cases.
  • theme-set-budget-test.sh runs theme-set with a signature, as a real session has.

🤖 Generated with Claude Code

dhh and others added 2 commits November 3, 2026 06:04
Running omarchy update from a remotely started herdr left the Superwhisper
migration failing silently: the shell had no HYPRLAND_INSTANCE_SIGNATURE, so
`hyprctl reload >/dev/null` exited 1 with its error discarded on stdout, and
the update stopped with nothing to show for why.

omarchy-restart-hyprctl now finds the newest live Hyprland instance when the
signature is missing or stale, does nothing when no Hyprland is running, and
reports a real reload failure on stderr. The dictation installers and removers
reload through it and no longer fail once their config is saved.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…session

hyprctl already finds the running instance itself, with no signature and no
XDG_RUNTIME_DIR, so the instance discovery and stale-signature handling go.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@dhh
dhh marked this pull request as ready for review November 3, 2026 13:49
The budget test runs theme-set without a Hyprland signature, so the helper
took the --instance 0 path the test didn't expect. Drop the repeated
caller comments.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[High impact] The shared reload path reaches commands across Omarchy's Hyprland workflows.

Update the two appearance tests before merging so they keep working outside a Hyprland session.

Findings

  1. P1 Appearance tests fail outside sessions ▶

Summary

Centralizes Hyprland reloads through omarchy-restart-hyprctl.

  • Omarchy reloads Hyprland from inside or outside the session.

Reviews (3) · Last reviewed commit: "Reload Hyprland through omarchy-restart-..." · Reviewed by Greptile

@greptile-apps

This comment has been minimized.

dhh and others added 2 commits November 3, 2026 05:59
Go back to the original name, route every bin/ reload through it, and
let the helper absorb a missing Hyprland so callers need no || true.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@dhh
dhh merged commit 5c0d91a into quattro Nov 3, 2026
3 checks passed
@dhh
dhh deleted the fix-hyprctl-reload-outside-session branch November 3, 2026 14:18
done

hyprctl reload >/dev/null || exit 1
omarchy-restart-hyprctl

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Appearance tests fail outside sessions

When HYPRLAND_INSTANCE_SIGNATURE is unset, this call now sends hyprctl --instance 0 reload. But hyprland-corners-test.sh and hyprland-window-transparency-test.sh still require the exact log entry hyprctl reload. Both tests stub hyprctl without setting a signature, so they now fail on headless machines.

Update both tests to stub omarchy-restart-hyprctl or set a test signature, as theme-set-budget-test.sh already does.

cursor Bot pushed a commit to mark-groves/omarchy that referenced this pull request Nov 3, 2026
* Reload Hyprland resiliently from outside the session

Running omarchy update from a remotely started herdr left the Superwhisper
migration failing silently: the shell had no HYPRLAND_INSTANCE_SIGNATURE, so
`hyprctl reload >/dev/null` exited 1 with its error discarded on stdout, and
the update stopped with nothing to show for why.

omarchy-restart-hyprctl now finds the newest live Hyprland instance when the
signature is missing or stale, does nothing when no Hyprland is running, and
reports a real reload failure on stderr. The dictation installers and removers
reload through it and no longer fail once their config is saved.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Simplify omarchy-restart-hyprctl to hyprctl --instance 0 outside the session

hyprctl already finds the running instance itself, with no signature and no
XDG_RUNTIME_DIR, so the instance discovery and stale-signature handling go.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Rename to omarchy-restart-hyprland and fix theme-set budget test

The budget test runs theme-set without a Hyprland signature, so the helper
took the --instance 0 path the test didn't expect. Drop the repeated
caller comments.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Test that a failed Hyprland reload doesn't fail Superwhisper setup

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Reload Hyprland through omarchy-restart-hyprctl everywhere

Go back to the original name, route every bin/ reload through it, and
let the helper absorb a missing Hyprland so callers need no || true.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
othavi0 pushed a commit to othavi0/omarchy that referenced this pull request Nov 4, 2026
Resolve the dictation test stub list by keeping the wtype and wl-copy
stubs from this branch alongside the omarchy-restart-hyprctl stub added
in omacom#17420.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018nY32cjvLYnzrixgw19o1Y
@emirb emirb added this to the 4.5 milestone Nov 5, 2026
cursor Bot pushed a commit to mark-groves/omarchy that referenced this pull request Nov 5, 2026
* Reload Hyprland resiliently from outside the session

Running omarchy update from a remotely started herdr left the Superwhisper
migration failing silently: the shell had no HYPRLAND_INSTANCE_SIGNATURE, so
`hyprctl reload >/dev/null` exited 1 with its error discarded on stdout, and
the update stopped with nothing to show for why.

omarchy-restart-hyprctl now finds the newest live Hyprland instance when the
signature is missing or stale, does nothing when no Hyprland is running, and
reports a real reload failure on stderr. The dictation installers and removers
reload through it and no longer fail once their config is saved.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Simplify omarchy-restart-hyprctl to hyprctl --instance 0 outside the session

hyprctl already finds the running instance itself, with no signature and no
XDG_RUNTIME_DIR, so the instance discovery and stale-signature handling go.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Rename to omarchy-restart-hyprland and fix theme-set budget test

The budget test runs theme-set without a Hyprland signature, so the helper
took the --instance 0 path the test didn't expect. Drop the repeated
caller comments.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Test that a failed Hyprland reload doesn't fail Superwhisper setup

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Reload Hyprland through omarchy-restart-hyprctl everywhere

Go back to the original name, route every bin/ reload through it, and
let the helper absorb a missing Hyprland so callers need no || true.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
berenddeboer pushed a commit to berenddeboer/omarchy that referenced this pull request Nov 6, 2026
* Reload Hyprland resiliently from outside the session

Running omarchy update from a remotely started herdr left the Superwhisper
migration failing silently: the shell had no HYPRLAND_INSTANCE_SIGNATURE, so
`hyprctl reload >/dev/null` exited 1 with its error discarded on stdout, and
the update stopped with nothing to show for why.

omarchy-restart-hyprctl now finds the newest live Hyprland instance when the
signature is missing or stale, does nothing when no Hyprland is running, and
reports a real reload failure on stderr. The dictation installers and removers
reload through it and no longer fail once their config is saved.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Simplify omarchy-restart-hyprctl to hyprctl --instance 0 outside the session

hyprctl already finds the running instance itself, with no signature and no
XDG_RUNTIME_DIR, so the instance discovery and stale-signature handling go.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Rename to omarchy-restart-hyprland and fix theme-set budget test

The budget test runs theme-set without a Hyprland signature, so the helper
took the --instance 0 path the test didn't expect. Drop the repeated
caller comments.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Test that a failed Hyprland reload doesn't fail Superwhisper setup

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Reload Hyprland through omarchy-restart-hyprctl everywhere

Go back to the original name, route every bin/ reload through it, and
let the helper absorb a missing Hyprland so callers need no || true.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 5c0d91a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants