Skip to content

Lua Gestures

HyprExpo exposes helpers under hl.plugin.hyprexpo when Hyprland is using Lua config support.

lua
hl.plugin.hyprexpo.expo("toggle")
hl.plugin.hyprexpo.expo("cancel")
hl.plugin.hyprexpo.kb_focus("left")
hl.plugin.hyprexpo.kb_confirm()
hl.plugin.hyprexpo.kb_selecti(1)
hl.plugin.hyprexpo.kb_selectn(1)
hl.plugin.hyprexpo.kb_select("1")

Gesture Setup

Gestures are configured from Lua:

lua
hl.plugin.hyprexpo.gesture({
    fingers = 4,
    direction = "up",
    action = "expo",
})

gesture accepts this table shape:

fieldtyperequireddescription
fingersintegeryesnumber of fingers
directionstringyesswipe direction
actionstringnoexpo or unset; defaults to expo
modsstringnomodifier expression passed to Hyprland
scalenumbernogesture scale; defaults to 1.0
disable_inhibitbooleannowhether to bypass inhibit handling

Argument Validation

Lua arguments are validated strictly:

functionaccepted arguments
expostring, defaulting to "toggle" when omitted
kb_focusstring
kb_confirmnone
kb_selectiLua integer or exact integer string
kb_selectnLua integer or exact integer string
kb_selectstring

Fractional numbers, booleans, tables where strings are expected, and partial numeric strings are rejected instead of being silently coerced.

HyprExpo is a maintained Hyprland plugin fork.