Quick question on Hyprland Lua config: how to correctly pass arguments to dispatchers?
Hey everyone! I'm rewriting my Hyprland config in Lua and ran into an issue with passing arguments to dispatchers.
Specifically, I'm struggling with two things:
Fullscreen modes: How do I correctly differentiate between fullscreen, 0 (true fullscreen) and fullscreen, 1 (maximize, keeping Waybar visible)? Right now, my Lua binds for both modes just cover the bar.
Also, how do I correctly handle relative workspace navigation within a single monitor? I'm trying to bind switching workspaces and moving windows using m-1 and m+1 arguments (like workspace, m-1 and movetoworkspace, m+1 in the standard config). What is the correct native Lua syntax to pass these monitor-relative values to the dispatchers? My current attempts just silently fail.
Here is what I've tried:
hl.bind(mainMod .. " + CONTROL + SHIFT + left", function() hl.dsp.exec_cmd("hyprctl dispatch movetoworkspace m-1") end)
hl.bind(mainMod .. " + CONTROL + SHIFT + right", function() hl.dsp.exec_cmd("hyprctl dispatch movetoworkspace m+1") end)hl.bind(mainMod .. " + CONTROL + SHIFT + left", function() hl.dsp.exec_cmd("hyprctl dispatch movetoworkspace m-1") end)
hl.bind(mainMod .. " + CONTROL + left", function() hl.dispatch(hl.dsp.workspace("m-1")) end)
hl.bind(mainMod .. " + CONTROL + right", function() hl.dispatch(hl.dsp.workspace("m+1")) end)hl.bind(mainMod .. " + CONTROL + left", function() hl.dispatch(hl.dsp.workspace("m-1")) end)
If anyone is using Lua for Hyprland and can share the correct syntax for these dispatchers, I would really appreciate it!