From ffd309ca2adc313f2aaaea08b4cac9553982b48c Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 16 Mar 2022 21:37:21 +0100 Subject: some basic startup code --- src/main.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 7b380308..da0437e8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,14 +1,25 @@ #include "defines.hpp" #include "debug/Log.hpp" +#include "Compositor.hpp" int main(int argc, char** argv) { - - if (!getenv("XDG_RUNTIME_DIR")) RIP("XDG_RUNTIME_DIR not set!"); + Debug::log(LOG, "Welcome to Hyprland!"); + + // let's init the compositor. + // it initializes basic Wayland stuff in the constructor. + g_pCompositor = std::make_unique(); + + Debug::log(LOG, "Hyprland init finished."); + + // If all's good to go, start. + g_pCompositor->startCompositor(); + // If we are here it means we got yote. + Debug::log(LOG, "Hyprland reached the end."); return EXIT_SUCCESS; } -- cgit v1.2.3