Skip to content

Instantly share code, notes, and snippets.

@Dregu
Dregu / repl.lua
Last active May 18, 2026 13:43
Lua REPL console for Hyprland
-- Lua UDP REPL console for Hyprland
-- Just stick repl.lua in .config/hypr and `require "repl"`
-- Connect with `socat readline,prompt="> " udp-datagram:localhost:42069`
-- Get luasocket somehow, `pacman -S lua-socket` installs here:
package.path = "/usr/share/lua/" .. _VERSION:sub(5) .. "/?.lua;/usr/share/lua/" .. _VERSION:sub(5) .. "/?/init.lua;" .. package.path
-- lua-inspect is on e.g. aur
-- Pretty useful, not really required, so lets not error on that, although hl custom error handler might do it anyway
_, inspect = pcall(require, "inspect")