Skip to content

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

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

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

Conversation

@merkhanov

Copy link
Copy Markdown

Summary

Six independent, atomic fixes for currently-open issues, each verified with a test that fails without the fix and passes with it:

Test plan

  • ./test/cli — passes
  • ./test/shell — passes (full suite, no regressions)
  • Each fix has a dedicated regression test; confirmed every one fails on the pre-fix code and passes after the fix (verified by reverting each change individually and re-running its test)
  • bin/omarchy-menu-keybindings's fix additionally verified against the issue's exact literal reproduction (ipairs(hl.get_windows() or {}) in a fake hyprland.lua), which hangs (timeout exit 124) before the fix and returns immediately after
  • default/hypr/bindings/tiling.lua's fix verified against the documented Hyprland Lua API (hl.bind accepting a function dispatcher, hl.dispatch for imperative dispatch) since no compositor is available in this environment to exercise it live

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

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