mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-04 06:01:56 -07:00
some basic startup code
This commit is contained in:
15
src/main.cpp
15
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<CCompositor>();
|
||||
|
||||
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user