Skip to content

Update hyprctl dispatch calls for Hyprland 0.55+ Lua dispatchers - #1

Open
83raiders wants to merge 2 commits into
SherLock707:mainfrom
83raiders:hyprland-0.55-lua-dispatch
Open

83raiders wants to merge 2 commits into
SherLock707:mainfrom
83raiders:hyprland-0.55-lua-dispatch

Conversation

@83raiders

Copy link
Copy Markdown

Summary

Hyprland 0.55 deprecated hyprlang config in favor of Lua, and as of 0.56 the old bare dispatcher-name syntax for hyprctl dispatch no longer works at all — confirmed live against a 0.56.0 instance, the old syntax now errors with:

hl.dispatch: expected a dispatcher (e.g. hl.dsp.window.close())
Note: dispatch in lua is a shorthand for hl.dispatch(...), your syntax might need to be updated.

This updates every hyprctl dispatch call in the script to the new hyprctl dispatch 'hl.dsp....(...)' form, plus two small fixes found while testing the migration live:

  • movewindowpixel → hl.dsp.window.move({ x, y, window })
  • resizewindowpixel → hl.dsp.window.resize({ x, y, window })
  • pin → hl.dsp.window.pin({ window })
  • movetoworkspacesilent → hl.dsp.window.move({ workspace, follow = false, window })
  • focuswindow → hl.dsp.focus({ window })
  • exec "[rules] cmd" → hl.dsp.exec_cmd(cmd, { ...rules }) (note: stayfocused rule became stay_focused)
  • Set no_anim on the window once at spawn, since Hyprland's own move-animation was fighting the script's manual step animation and causing visible jitter during hide/show
  • Wired up SLIDE_DELAY (previously defined but silently ignored — sleeps were hardcoded) and removed the unused ANIMATION_DURATION

Note: this is a breaking-change requirement — it only works on Hyprland >= 0.55 with a Lua config, and will not work on older hyprlang-based configs. Maintainer may want to gate this by version or document it as a separate branch/README note rather than replacing the old syntax outright, since not everyone has migrated to Lua config yet.

Test plan

  • Verified old dispatcher syntax errors on live Hyprland 0.56.0
  • Verified each new hl.dsp.* call individually against a live compositor before applying
  • Ran the full script end-to-end (spawn / hide / show toggle cycle) against a real dropdown kitty terminal

🤖 Generated with Claude Code

83raiders added 2 commits July 24, 2026 08:19
Hyprland 0.55 deprecated hyprlang in favor of Lua config, and as of
0.56 the old bare dispatcher-name syntax (e.g. `hyprctl dispatch
movewindowpixel "..."`) no longer works at all — it now errors with
"dispatch in lua is a shorthand for hl.dispatch(...), your syntax
might need to be updated." All dispatch calls now go through
`hyprctl dispatch 'hl.dsp....(...)'`.

Migrated dispatchers used by this script:
- movewindowpixel      -> hl.dsp.window.move({ x, y, window })
- resizewindowpixel    -> hl.dsp.window.resize({ x, y, window })
- pin                  -> hl.dsp.window.pin({ window })
- movetoworkspacesilent-> hl.dsp.window.move({ workspace, follow = false, window })
- focuswindow          -> hl.dsp.focus({ window })
- exec "[rules] cmd"   -> hl.dsp.exec_cmd(cmd, { ...rules })
  (note: the "stayfocused" rule became "stay_focused")

Verified against a live Hyprland 0.56.0 instance: the old syntax
errors, and each of the above mappings was tested individually
before being applied here. This is a breaking-change requirement
for anyone on Hyprland >= 0.55 with a Lua config; it will not work
on older hyprlang-based configs.
Found while testing the Lua dispatch migration against a live
Hyprland 0.56 session:

- Hyprland's own window-move animation was fighting this script's
  manual step-by-step slide animation, causing visible jitter/jump
  during hide and show. Set the `no_anim` window prop once at spawn
  time (hl.dsp.window.set_prop) so Hyprland leaves positioning
  entirely to the script for that window's lifetime.
- SLIDE_DELAY was defined (5ms) but never actually used — both
  animate_slide_up/down had the per-step sleep hardcoded to 0.03s
  regardless. It's now wired up (default raised to 30ms, matching
  the previous de facto behavior) so it's an actually-working knob.
- ANIMATION_DURATION was defined but referenced nowhere; removed.
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.

1 participant