Fix a default Omarchy shortcut that still fires after you rebind or unbind it
The main claim holds. modmask_to_text in /usr/share/omarchy/bin/omarchy-menu-keybindings (4.0.4-1) prints space-separated modifiers, and parse_binding_records adds one + before the key. Issue 7627 reports exactly this. o.rebind exists on quattro helpers.lua (line 154) and is absent from the 4.0.4 helpers.lua. The quattro bindings.lua template documents it. One claim is wrong for 0.56.2. In v0.56.2 source, hl.unbind calls CKeybindManager::removeKeybind(displayKeys), and that function compares the strings after removing all spaces and lowercasing both. SUPER + Tab therefore does unbind SUPER + TAB, despite what the wiki says. The SUPER SHIFT + S paste still fails, because after normalising it becomes supershift+s against super+shift+s, so the missing + is the real cause. The fix is rewritten with the case sentence corrected and everything else kept. Second audit confirmed the corrected text: The current corrected text holds. In /usr/share/omarchy/bin/omarchy-menu-keybindings on 4.0.4-1, modmask_to_text prints space-separated modifiers (65 becomes 'SUPER SHIFT'), and parse_binding_records joins modifiers and key with a single ' + '. --print is handled at line 583. Issue #7627 (open) reports exactly this. In Hyprland v0.56.2, removeKeybind(displayKeys) strips spaces and lowercases both sides, so the case claim and the missing-plus claim are both right. tiling.lua registers ALT+TAB twice, which confirms that stacked binds all run. o.rebind is present at line 154 of quattro's helpers.lua and absent from the 4.0.4 helpers.lua. A default SUPER+SHIFT+S bind exists (Google Maps, applications.lua:31, modmask 65, key 'S'), so the verify count of 1 after the fix is meaningful. Nothing was rebound live.
Symptom
You add your own binding in ~/.config/hypr/bindings.lua on a key Omarchy already uses (for example SUPER+W) and now pressing it does your action AND the old one, or neither seems to work. Or you copy a combo from omarchy menu keybindings --print, which shows it as SUPER SHIFT + S, into hl.unbind("SUPER SHIFT + S") and the default shortcut keeps firing. No error appears anywhere.
Cause
Hyprland runs every bind registered for a chord, top to bottom, so o.bind on a key Omarchy has already bound adds a second action instead of replacing the first. hl.unbind("keys") removes all binds for that key registered before it, but only when the string matches the registered one exactly. Omarchy 4 binds use a + between every part ("SUPER + SHIFT + S"). omarchy menu keybindings --print formats the modifiers from the modmask as space-separated words (SUPER SHIFT, see modmask_to_text in /usr/share/omarchy/bin/omarchy-menu-keybindings) with a single + before the key, so a combo pasted from it never matches and the unbind silently does nothing. Confirmed on 4.0.4-1 by reading the script.
Fix
**Omarchy 4.0.4.** In ~/.config/hypr/bindings.lua, unbind the default with the full + separated form, then bind your replacement:
-- --print shows "SUPER SHIFT + S". The Lua form needs a + between every part.
hl.unbind("SUPER + SHIFT + S")
o.bind("SUPER + SHIFT + S", "Screenshot", "omarchy-capture-screenshot")
-- Move close window from SUPER+W to SUPER+Q
hl.unbind("SUPER + W")
hl.unbind("SUPER + Q")
o.bind("SUPER + Q", "Close window", hl.dsp.window.close())
Unbind the target key too when it already has a default action, or you get both again. What has to match is the + between every part. Hyprland 0.56.2 strips spaces and ignores case when it compares the hl.unbind string, so SUPER + Tab does remove SUPER + TAB, but SUPER SHIFT + S (no + between the modifiers) never matches SUPER + SHIFT + S. The wiki still describes the match as case-sensitive, so keep the same case anyway for newer releases.
Find the exact registered key and modmask for a default when in doubt:
hyprctl binds -j | jq -r '.[] | select(.description == "Close window") | "\(.modmask) \(.key)"'
Modmask values: SHIFT 1, CTRL 4, ALT 8, SUPER 64, added together.
**Newer Omarchy builds.** The quattro branch template now offers o.rebind(keys, description, dispatcher), which is hl.unbind(keys) followed by o.bind. It is not in 4.0.4, so check grep -n 'function o.rebind' /usr/share/omarchy/default/hypr/helpers.lua before using it.
**Plain Arch.** The same rules hold for hl.bind and hl.unbind in your own hyprland.lua: unbind before rebinding, and put a + between every part of the key string.
Verify
After saving, hyprctl binds -j | jq '[.[] | select(.modmask == 65 and .key == "S")] | length' returns 1 (your bind) rather than 2, and the old action no longer runs.
Sources
- https://github.com/omacom/omarchy/issues/7627
- https://github.com/omacom/omarchy/issues/12050
- https://github.com/omacom/omarchy/blob/quattro/config/hypr/bindings.lua
- https://github.com/hyprwm/hyprland-wiki/blob/main/content/configuring/core/binds/_index.md
- https://github.com/hyprwm/Hyprland/blob/v0.56.2/src/managers/KeybindManager.cpp
- https://github.com/hyprwm/Hyprland/blob/v0.56.2/src/config/lua/bindings/LuaBindingsToplevel.cpp