Skip to content

Fix five reported bugs: bar toggle, hibernation, weather, keybindings menu, group binds - #12155

Open
merkhanov wants to merge 9 commits into
omacom:quattrofrom
merkhanov:fix/reported-issues-batch
Open

merkhanov wants to merge 9 commits into
omacom:quattrofrom
merkhanov:fix/reported-issues-batch

Conversation

@merkhanov

@merkhanov merkhanov commented Sep 16, 2026 •

Copy link
Copy Markdown

Summary

Five independent, atomic fixes for currently-open issues. Each has a regression test that fails without the fix and passes with it.

The omarchy-windows-vm setgid fix that was originally part of this bundle is gone. #12323 landed the same fix on quattro with a symbolic mode, so merging quattro dropped those hunks along with the duplicate test.

On the group-window fix

Checking the group size needs the live group, so these binds are Lua functions. Hyprland reports a Lua bind as plain __lua without the dispatcher behind it, so each bind also registers an equivalent command in o.bind_commands, the way helpers.lua already does for o.launch_terminal and o.bind_hold. Without that, bin/omarchy-menu-keybindings caches an empty dispatcher, dispatch_binding returns 1, and picking "Switch to group window 2" out of the menu does nothing even when the group has a second window.

Test plan

These ran on macOS, where the suite cannot run in full: /bin/bash is 3.2 and has neither mapfile nor declare -A, and BSD sed rejects several of the scripts' expressions.

Passing:

  • test/shell.d/hyprland-group-window-bindings-test.sh (new)
  • test/shell.d/keybindings-lua-sandbox-test.sh (new)
  • test/shell.d/hyprland-default-config-test.sh, which loads tiling.lua
  • omarchy commands --check, 516 commands
  • the CI i18n gate, python3 scripts/i18n-sync.py extract-scan --check, with no candidates and no stale catalogs

Failing here, and failing identically on unmodified quattro, so these are environment limits rather than regressions:

  • test/shell.d/toggle-test.sh exits 1, after all 16 of its assertions pass, including the new argument-rejection one
  • test/shell.d/weather-test.sh aborts
  • ./test/cli fails on "main help includes hardware group"

Every new test was confirmed to fail on the pre-fix code. The group-bind test fails on the plain dispatcher at its "binds a function" assertion, and on an earlier pcall-based attempt at its "names a command the menu can run" assertion.

Two things are not verified here, because no compositor is available: that the group binds behave correctly in a live Hyprland session, and that picking one from the keybindings menu dispatches. The test covers the value the menu scanner reads, not the menu itself. The window.group.size shape is the one reported as tested on a Hyprland 0.56.2 VM in #8411.

Overlap with other open pull requests

Reviewers have asked for this bundle to be split, and most of these fixes have single-purpose pull requests: #13670 for the bar, #13584 for hibernation, #12138 for weather, #12712 for the keybindings hang, and #15100 and #8411 for the group binds. #15100 takes the same approach as the group-window commit here. #8411 is older but leaves its binds unrunnable from the keybindings menu.

Happy to close this in favour of those, or to split the keybindings and group-window commits out on their own. Say which you prefer.

on hid the bar and off showed it, backwards from what a user calling
`omarchy toggle bar on/off` expects. The bug lived in the raw passthrough
to the bar-off flag (`omarchy-toggle bar-off "$1"`), so the fix maps on/off
explicitly instead of forwarding the argument as-is.

omarchy-toggle-fullscreen-desktop called omarchy-toggle-bar with its own
on/off (fullscreen state, not bar state) and relied on the old inverted
semantics to hide the bar on "on"; it now maps that call explicitly too so
entering/leaving full screen still hides/shows the bar correctly.

Fixes omacom#12082
setup writes /etc/limine-entry-tool.d/resume.conf (and rtc-alarm.conf on
s2idle systems) with resume= kernel parameters, but remove only deleted the
mkinitcpio hook. The rebuilt UKI kept pointing at a swapfile that no longer
existed. remove now deletes both drop-ins before regenerating the initramfs,
symmetric with what setup creates.

Fixes omacom#12096
wttr.in's auto-detect (?format=%l) usually answers "City, Country", which
the script truncated at the first comma to get the city. For some IPs it
instead answers bare "lat,lon" coordinates, and the same truncation chopped
that at its own comma too, leaving a bare latitude that wttr.in rejects as
a location query -- surfacing as "Weather unavailable" with no location set.

Only truncate at the comma when the response isn't itself a coordinate pair.

Fixes omacom#12127
…id bit

The dockurr/windows container sets its bind-mounted storage/shared folders
to mode 2777 (setgid + world-writable) on every boot. Per chmod(1), a plain
numeric mode like "0700" preserves a directory's existing setgid bit unless
given a leading zero, minus, or equals form -- so the existing "chmod 0700"
calls silently left the directories at 2700. mounted_leaf_matches() and
prepare_user_mount_sources() both compare against an exact mode of 700, so
every launch after the VM's first boot failed permanently until the bit was
cleared by hand.

Use the "00700" form (and add a regression test simulating the container's
2777 mutation) so the existing hardening actually clears the bit.

Fixes omacom#12134
…etter

omarchy-menu-keybindings re-executes the user's hyprland.lua under a stub hl
object to recover descriptions for binds Hyprland reports as dispatcher
__lua. The stub's fallback answers every undefined member with a `noop`
object whose __index metamethod always returns itself -- including for
numeric keys. A config that runs a completely valid pattern inside the real
compositor, e.g. `for _, w in ipairs(hl.get_windows() or {}) do`, calls
ipairs on that noop object; since t[i] never returns nil, ipairs never
terminates, hanging the menu (and leaking an unreaped 100%-CPU lua process
per keypress).

Make noop's __index return nil for numeric keys so ipairs terminates
immediately, while still returning noop for string keys so a chained call
like hl.get_windows().active remains a harmless no-op.

Fixes omacom#12124, omacom#12052
…index

The default group-window bindings register indices 1-5 unconditionally
against hl.dsp.group.active(...). Hyprland rejects an index past the
group's actual window count, but Omarchy surfaces that rejection as a
"Runtime error in lua: Index out of range" notification instead of doing
nothing.

A native dispatcher object gives the config no way to guard the rejection,
since no Lua runs again at keypress time -- only a Lua function dispatcher
does. Switch to one and pcall the dispatch so a miss is silently a no-op,
matching Hyprland's own behavior for a genuinely out-of-range group index.

Fixes omacom#12085
@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks for working through these. I reviewed all six commits against quattro and read the other open pull requests that fix the same bugs. Codex Medium gave a second opinion through omabot. Nothing was run on a worker: once the bundle was weighed against those pull requests, verifying it would not change what happens next.

Competing fixes. Five of the six bugs already have open pull requests that fix only that bug, and #12127's fix is already verified in #12138, which makes the same change to bin/omarchy-weather-location as this pull request. Since a bundle can only be merged whole, merging it would collide with whichever of these fixes lands first. The single-purpose pull requests for each bug:

Defects found in this pull request:

  • default/hypr/bindings/tiling.lua:99: turning the group binds into Lua functions breaks them in the keybindings menu. The menu's scanner (bin/omarchy-menu-keybindings, hl.bind stub) records a dispatcher only when it is an hl.dsp value or a string, so a function gets an empty dispatcher. Picking "Switch to group window 2" from the menu then does nothing, even when the group has a second window. I confirmed this in the source.
  • Same lines: Codex traced Hyprland 0.56.2 and found that the "Index out of range" error is reported through the config error path before the Lua call returns, so pcall would not suppress the notification. The pull request says this was not run on a compositor, and neither was this review, so the fix is not shown to work either way. A fix that never dispatches an index past the group's window count would avoid the question.
  • bin/omarchy-toggle-bar:10: the *) branch turns any unrecognised argument into a toggle. Before, omarchy-toggle rejected it with a usage error, so a typo like omarchy toggle bar offf now flips the bar instead of failing. Fix bar toggle on/off polarity #13451 and Make omarchy toggle bar on/off match user polarity #13670 pass the argument through and keep the rejection.

What checked out: chmod 00700 does clear setgid on a directory under GNU coreutils, where 0700 leaves it set. Both mount-hardening sites are covered, and the third chmod 0700 (the credentials directory) is not mounted into the container. Removing rtc-alarm.conf in omarchy-hibernation-remove matches what omarchy-hibernation-setup writes, and #13584 does not remove that file. The keybindings stub change fixes the hang.

Next: this waits on the maintainer to choose between this bundle and the per-bug pull requests. The group-window fix, which nothing else covers, would be easiest to land as its own pull request, with the menu and notification problems above addressed.

@omarchybot

Copy link
Copy Markdown
Collaborator

Following the merge of #12323, Only the Windows setgid part of this six-fix bundle is covered by the merged PR. Keep the unrelated bar, hibernation, weather, keybindings and group-window fixes open; remove the duplicate Windows changes.

Scope checked by GPT-6 in Codex and Codex Medium against the discussion and landed change; review independence is not guaranteed. No tests were rerun for this cleanup.

Omabot on behalf of DHH

@jandrusk

Copy link
Copy Markdown

@omarchybot

Copy link
Copy Markdown
Collaborator

The head has not moved since the last review, so this only updates where each of the six fixes stands against the other open pull requests. I read the diffs against quattro again, and Codex Medium gave a second opinion through omabot on which fix should go forward for each bug. Nothing was run on a worker, and both reviews were of source only.

One new defect, in the hibernation fix. omarchy-hibernation-remove now deletes resume.conf, but a machine that already ran the old remove still has that file pointing at the deleted swapfile. omarchy-hibernation-setup writes the drop-in only when it is missing, so setting hibernation up again keeps the stale resume_offset. #13584 also makes setup rewrite the drop-in every time, which covers those machines, so it is the fix to go forward for #12096. The rtc-alarm.conf cleanup here is the one piece #13584 lacks. Codex found this and I confirmed it in the source.

Where each fix stands now:

Next: this waits on the maintainer. The keybindings and group-window changes are the parts worth keeping, and each would be easier to land as its own pull request. The group-window one should check the group's window count before dispatching.

merkhanov and others added 3 commits October 14, 2026 23:27
The only conflict was bin/omarchy-windows-vm. omacom#12323 landed the same
setgid fix on quattro using a symbolic mode (chmod u=rwx,go=,a-s) where
this branch used chmod 00700, so the branch takes quattro's version and
no longer changes that file.

Two follow-ups the text merge could not see:

- Dropped this branch's setgid test block from
  test/shell.d/windows-vm-mount-boundary-test.sh. It merged cleanly but
  tested a code change this branch no longer makes, and omacom#12323 added
  equivalent coverage to the same file.
- Updated the omarchy:summary line in bin/omarchy-toggle-bar. Quattro
  had reworded it to document the inverted behaviour ("on hides the bar,
  off shows it"), which contradicts this branch's fix.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Correcting the inverted on/off passthrough left a `*)` branch that mapped
anything else to `toggle`. omarchy-toggle itself answers an unrecognised
argument with a usage error and exit 1, so `omarchy toggle bar offf` used
to fail and now flipped the bar instead.

Give the wrapper its own usage error rather than passing the argument
down: the script has no `set -e` and ends with `omarchy-shell -q
omarchy.bar syncHidden`, so a rejection from the callee would print and
then exit with whatever the nudge returned, leaving the typo looking like
a success. `toggle` needs its own branch now that `*)` rejects.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The pcall guard this branch added made the binds Lua functions, and the
keybindings menu's scanner records a dispatcher only for an
__omarchy_dispatcher table, a string, or an o.bind_commands lookup
(bin/omarchy-menu-keybindings). A function matched none of those, so the
cached dispatcher came back empty, overwrote the __lua one that
`hyprctl binds` reports, and dispatch_binding returned 1. Picking
"Switch to group window 2" from the menu did nothing even when the group
had a second window.

The pcall was also the wrong guard. Hyprland reports the rejection
through its dispatcher result rather than by raising a Lua error, so it
would still have notified.

Check the focused window's group size before dispatching, so nothing is
dispatched past the end of the group and Hyprland has nothing to reject,
and register the equivalent command in o.bind_commands so the menu can
still run the bind. Same approach as omacom#15100. The window.group.size shape
is the one omarchybot verified on a Hyprland 0.56.2 VM against omacom#8411.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@merkhanov merkhanov changed the title Fix six reported bugs: bar toggle, hibernation, weather, VM mounts, keybindings menu, group binds Fix five reported bugs: bar toggle, hibernation, weather, keybindings menu, group binds Oct 14, 2026
@omarchybot omarchybot removed the bug Something isn't working label Oct 14, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

The head moved to 0f745ba, so I read the new commits against quattro. They address both defects raised earlier. In bin/omarchy-toggle-bar, an unrecognised argument now gets a usage error and exit 1 instead of a toggle. The group-window binds now check window.group.size before dispatching, and they register an o.bind_commands entry so the keybindings menu can still run them (bin/omarchy-menu-keybindings:244 reads it). Nothing was run on a worker.

Classification is unsettled. I classified this as a bug fix, and Codex Medium, classifying it separately, called it an enhancement. Because the two answers disagree, the bug label is removed until the classification is settled. The likely source of the split is that the bundle changes deliberate behaviour as well as fixing broken behaviour. omarchy toggle bar on and off swap meaning against what quattro documents as its summary line ("on hides the bar, off shows it"), and the acceptance test is rewritten to the new meaning.

Where the fixes stand. Most of this bundle still competes with single-purpose pull requests:

A bundle can only be merged as a whole, so it collides with each of these.

Next: this waits on the maintainer to settle the classification and choose between this bundle and the per-bug pull requests.

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.

3 participants