Skip to content

[Bug]: Hyprland shortcut setup rejects its existing Lua binding #10657

Description

@AksharP5

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

  1. On Omarchy with Hyprland 0.56.2 and Lua configuration, finish SnapShots setup using Ctrl+Shift+2.
  2. Confirm the shortcut captures a window.
  3. Reopen Settings > SnapShots > Change shortcut.
  4. Keep the existing shortcut and click Review changes.

Expected behavior

Setup recognizes the installed shortcut and shows "This shortcut is already set up." Done should complete without rewriting or reloading the config.

Actual behavior

Review changes fails with "Couldn't prepare the changes. Check Advanced for help." Advanced shows a generic DesktopSnapShotSetupError. The underlying preview rejects the existing shortcut as already used by Hyprland.

Hyprland reports Lua bindings as dispatcher: "__lua" with a numeric callback argument. The existing binding is:

hl.bind("CTRL + SHIFT + 2", hl.dsp.global("com.t3tools.T3Code:capture-window"))

CaptureShortcutConfig.checkHyprlandKeys exempts only a global dispatcher with the capture action. It consequently rejects the app's own Lua binding even when editCaptureConfig has already found that no config change is needed. The same check runs again during apply.

Reproduced through the unchanged preview API using the current user config and live hyprctl -j binds, and confirmed in the desktop setup dialog. No config writes are needed to reproduce it.

Impact

Minor bug or occasional failure. Reopening setup fails; the already configured capture shortcut continues to work.

Version or commit

main @ a01b227. Introduced with #8103.

Environment

Omarchy 4 development branch; Hyprland 0.56.2; native Wayland; Lua config in the user bindings file.

Workaround

Close setup and keep using the existing shortcut. Changing to a different unused shortcut still works.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedfeature request acceptedbugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions