Lua-configured input daemon for Xorg
Binding Example → Mouse cursor as volume slider
function volume_slider(x, y, wid)
local max_y = lucky.get_geometry(lucky.get_root()).height - 1
local percent = math.floor(((max_y - y) / max_y) * 100)
lucky.cmd(
'pactl',
'set-sink-volume',
'@DEFAULT_SINK@',
tostring(percent) .. '%'
)
end
lucky.bind("mouse_left", {
filter = function(x, y, wid)
return x == 0
end,
press = volume_slider,
motion = volume_slider
})
Region selector for X and Wayland
Region selector for X