Skip to content

Keep the default layout getter quiet without a Hyprland session - #21999

Open
TechLuddite wants to merge 1 commit into
omacom:quattrofrom
TechLuddite:fix/workspace-layout-default-jq-stderr
Open

TechLuddite wants to merge 1 commit into
omacom:quattrofrom
TechLuddite:fix/workspace-layout-default-jq-stderr

Conversation

@TechLuddite

Copy link
Copy Markdown
Contributor

What changes

Running omarchy update from outside a Hyprland session (SSH, tmux) prints a stray error in the update log while migration 1796068911.sh runs:

Hide the dock until the pointer reaches its edge, unless workspaces float by default
jq: parse error: Invalid numeric literal at line 1, column 28
Dock visibility set to hidden

With no saved default, omarchy-hyprland-workspace-layout-default falls back to hyprctl getoption general.layout -j | jq. Outside a session hyprctl prints HYPRLAND_INSTANCE_SIGNATURE not set! (is hyprland running?) on stdout, which jq cannot parse. The command still prints dwindle, and the migration's choice is unaffected because a floating default only lives in the saved default.lua. The only effect is the misleading line.

This discards jq's stderr on that fallback. Output and exit status are unchanged.

Verification

  • Seen on two machines updating 4.5.0-3 to 4.6.0-1 over SSH, and reproduced by running omarchy-hyprland-workspace-layout-default over SSH with no HYPRLAND_INSTANCE_SIGNATURE.
  • Added a case to test/shell.d/hyprland-floating-workspaces-test.sh: the hyprctl stub answers getoption with the real no-session message, and the command must print dwindle and nothing else. It fails without the fix, showing the jq parse error, and passes with it.
  • Ran bash test/shell.d/hyprland-floating-workspaces-test.sh (passes). Did not run ./test/all.
  • Not changed here: the same hyprctl | jq pattern exists in omarchy-hyprland-monitor-focused, omarchy-hyprland-monitor-laptop, omarchy-hw-touchpad, omarchy-hyprland-workspace-layout-current and omarchy-hyprland-workspace-layout-toggle.

Screenshots

No visible change: removes one stderr line from the update log.

Co-Authored-By: Claude Fable 5.2 (high effort, Claude Code) on behalf of TechLuddite

With no saved default, omarchy-hyprland-workspace-layout-default falls
back to hyprctl getoption piped to jq. Outside a Hyprland session
hyprctl prints its reason on stdout, which jq cannot parse, so
omarchy update over SSH logged "jq: parse error: Invalid numeric literal
at line 1, column 28" while migration 1796068911.sh ran.

Discard jq's stderr on that fallback. Output and exit status are
unchanged.

Co-Authored-By: Claude Fable 5.2 (high effort, Claude Code) on behalf of TechLuddite
@greptile-apps

greptile-apps Bot commented Dec 6, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5RetriggerView in Greptile

[Low impact] The PR appears safe to merge.

Summary

Keeps omarchy-hyprland-workspace-layout-default quiet when Hyprland returns a non-JSON explanation outside a session.

  • The default layout lookup stays quiet when Hyprland is not running.

Reviews (2) · Last reviewed commit: "Keep the default layout getter quiet wit..." · Reviewed by Greptile

@omarchybot omarchybot added the bug Something isn't working label Dec 6, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Recommend: Hold — waiting for a maintainer to arrange worker verification of the PR head.

An ISO worker reproduced the error on , where the getter still printed and exited successfully. GitHub CI passed on this head. The bot credential scope prevented a separate worker run of the head. Codex High, Opus 5.5 High and muse-wonder via pi, thinking high agreed on the fix. The model reviews may have shared context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants