summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 2c9ad503..b60d70d7 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -2,6 +2,9 @@
#include "helpers/Splashes.hpp"
#include <random>
#include "debug/HyprCtl.hpp"
+#ifdef USES_SYSTEMD
+#include <systemd/sd-daemon.h> // for sd_notify
+#endif
int handleCritSignal(int signo, void* data) {
Debug::log(LOG, "Hyprland received signal %d", signo);
@@ -384,6 +387,15 @@ void CCompositor::startCompositor() {
wlr_xcursor_manager_set_cursor_image(m_sWLRXCursorMgr, "left_ptr", m_sWLRCursor);
+#ifdef USES_SYSTEMD
+ if (sd_booted() > 0)
+ // tell systemd that we are ready so it can start other bond, following, related units
+ sd_notify(0, "READY=1");
+ else
+ Debug::log(LOG, "systemd integration is baked in but system itself is not booted à la systemd!");
+#endif
+
+
// This blocks until we are done.
Debug::log(LOG, "Hyprland is ready, running the event loop!");
wl_display_run(m_sWLDisplay);