-- Shared helpers for Hyprland Lua configuration. o = o or {} local function shell_quote(value) return "'" .. tostring(value):gsub("'", "'\\''") .. "'" end function o.bind(keys, description, dispatcher, options) local opts = options or {} if description then opts.description = description end if type(dispatcher) == "string" then dispatcher = hl.dsp.exec_cmd(dispatcher) end hl.bind(keys, dispatcher, opts) end function o.launch(command) return "uwsm-app -- " .. command end function o.launch_on_start(command) hl.on("hyprland.start", function() hl.exec_cmd(command) end) end function o.launch_webapp(url) return "omarchy-launch-webapp " .. shell_quote(url) end function o.launch_webapp_sole(name, url) return "omarchy-launch-or-focus-webapp " .. shell_quote(name) .. " " .. shell_quote(url) end