summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-06-03 17:41:57 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-06-03 17:41:57 +0200
commit6f3b004199a6b1bb0a8f5431d677ab926bdf19f3 (patch)
tree227dec00bfbcefa60cf0ebe7329508f439237c62 /src/Compositor.cpp
parent19b17b590c8a2dc19e79542796c7b1b8e65301de (diff)
IPC and log changes, introduce signature
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index f7f1d68f..c9a89603 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -1,11 +1,14 @@
#include "Compositor.hpp"
CCompositor::CCompositor() {
- unlink("/tmp/hypr/hyprland.log");
- unlink("/tmp/hypr/hyprlandd.log");
- unlink("/tmp/hypr/.hyprlandrq");
+ m_szInstanceSignature = GIT_COMMIT_HASH + std::string("_") + std::to_string(time(NULL));
- system("mkdir -p /tmp/hypr");
+ Debug::log(LOG, "Instance Signature: %s", m_szInstanceSignature.c_str());
+
+ setenv("HYPRLAND_INSTANCE_SIGNATURE", m_szInstanceSignature.c_str(), true);
+
+ const auto INSTANCEPATH = "/tmp/hypr/" + m_szInstanceSignature;
+ mkdir(INSTANCEPATH.c_str(), S_IRWXU | S_IRWXG);
m_sWLDisplay = wl_display_create();