From a5a648091760ac002120fab18247e5292b6482de Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sun, 28 Apr 2024 22:25:24 +0100 Subject: core: Move /tmp/hypr to $XDG_RUNTIME_DIR/hypr (#5788) Moves the directory containing sockets and logs. Also restructures lockfiles a bit. For consumers, check if `$XDG_RUNTIME_DIR/hypr` exists. If so, use it. If not, use the old `/tmp/hypr`. --- src/main.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index e1f43ad0..7e6fee02 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -97,8 +97,13 @@ int main(int argc, char** argv) { // let's init the compositor. // it initializes basic Wayland stuff in the constructor. - g_pCompositor = std::make_unique(); - g_pCompositor->explicitConfigPath = configPath; + try { + g_pCompositor = std::make_unique(); + g_pCompositor->explicitConfigPath = configPath; + } catch (std::exception& e) { + std::cout << "Hyprland threw in ctor: " << e.what() << "\nCannot continue.\n"; + return 1; + } g_pCompositor->initServer(); -- cgit v1.2.3