Which functions can I use with gestures?

Hyprland version
hyprland 0.56.1 built from branch v0.56.1 at commit 5c9377c15f85c50648f35ca5a213754f95b93ca0 clean (version: bump to 0.56.1).
Date: Mon Jul 27 16:33:49 2026
Tag: v0.56.1, commits: 7643

Libraries:
Hyprgraphics: built against 0.5.1, system has 0.5.1
Hyprutils: built against 0.14.0, system has 0.14.0
Hyprcursor: built against 0.1.13, system has 0.1.13
Hyprlang: built against 0.6.8, system has 0.6.8
Aquamarine: built against 0.14.0, system has 0.14.0

Version ABI string: 5c9377c15f85c50648f35ca5a213754f95b93ca0_aq_0.14_hu_0.14_hg_0.5_hc_0.1_hlg_0.6
no flags were set

I wanted to set some gestures for my track pad and while the given actions are nice, I think they can be more precise, for example, when I want to move a window (silently) to another workspace (i. e. left or right) by a track pad gesture. Now, with the default gesture actions I can “only” move a window, but not move it to another workspace. In previous versions, before switching to the lua config, there was a dispatcher "movetoworkspacesilent" to do exactly this, but this is not available anymore.

So, I tried to do it with a function as it’s explained in the current wiki.
But obviously some functions like hl.notification.create. or hl.exec_cmd. work (as stated in the wiki), while others don’t for instance: hl.dsp.window.
So, my questions are:

  1. Which functions can I use with gestures?
  2. Is there a possibility to combine the window dispatching functions with gestures?

Thanks for your hints!!

You can use any function you want with lua, or your own functions.

Thanks for your reply!
Then I must be doing something wrong when going like this:

hl.gesture({
    fingers = 3, direction = "pinchin",
    action = function()
      hl.dsp.window.move({ workspace = "e+1" })
    end
})

I copied this exact function over from my binds section. And the keyboard bind does work perfectly. That’s why I don’t get it’s not working here.

Do you see my error?

Yes. One of the quirks of how hyprland handle functions.
All the functions called .dsp. need to be called either via hl.dispatch() or hl.bind().
So in this case you would do:

hl.dispatch(hl.dsp.window.move({ workspace = "e+1" }))

to let hyprland know: Hey! Run this function!

Sweet! Thank you, now it works!