gfx.wayland.socket_path

gfx.wayland

socket_path(display, runtime_dir) -> path, err

Find the compositor's socket

display is $WAYLAND_DISPLAY's value, runtime_dir is $XDG_RUNTIME_DIR's. An absolute display is the path as it stands; any other joins the runtime dir. Returns nil and an error when display is unset or empty, or when a relative one has no runtime dir. $WAYLAND_SOCKET is not read.