Hyprland/src/main.cpp

29 lines
701 B
C++
Raw Normal View History

2022-03-16 20:50:55 +01:00
#include "defines.hpp"
#include "debug/Log.hpp"
2022-03-16 21:37:21 +01:00
#include "Compositor.hpp"
2022-03-17 15:53:45 +01:00
#include "config/ConfigManager.hpp"
2022-03-16 20:50:55 +01:00
int main(int argc, char** argv) {
if (!getenv("XDG_RUNTIME_DIR"))
RIP("XDG_RUNTIME_DIR not set!");
2022-03-16 21:37:21 +01:00
Debug::log(LOG, "Welcome to Hyprland!");
// let's init the compositor.
// it initializes basic Wayland stuff in the constructor.
g_pCompositor = std::make_unique<CCompositor>();
Debug::log(LOG, "Hyprland init finished.");
// If all's good to go, start.
g_pCompositor->startCompositor();
2022-03-16 20:50:55 +01:00
2022-03-16 21:37:21 +01:00
// If we are here it means we got yote.
Debug::log(LOG, "Hyprland reached the end.");
2022-03-16 20:50:55 +01:00
g_pCompositor->cleanupExit();
2022-03-17 19:03:15 +01:00
2022-03-16 20:50:55 +01:00
return EXIT_SUCCESS;
}