[][src]Function ksway::guess_sway_socket_path

pub fn guess_sway_socket_path() -> Result<PathBuf>

Try to guess the value of SWAYSOCK by first checking for the environment variable or using the most recently created sock file at /run/user/$UID/sway-ipc.*.sock. This is useful for the situation where a command is being run from systemd or outside of the GUI environment.