forked from LemonOSProject/LemonOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.cpp
30 lines (22 loc) · 1.01 KB
/
Main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "WM.h"
#include <Lemon/Core/ConfigManager.h>
#include <Lemon/Core/Framebuffer.h>
#include <Lemon/Core/Logger.h>
#include <Lemon/System/Spawn.h>
int main() {
Surface displaySurface;
Lemon::CreateFramebufferSurface(displaySurface);
Lemon::Logger::Debug("Initializing LemonWM...");
ConfigManager config;
config.AddConfigProperty<std::string>("backgroundImage", "/system/lemon/resources/backgrounds/bg7.png");
config.AddConfigProperty<std::string>("theme", "/system/lemon/themes/default.json");
config.AddConfigProperty<bool>("displayFramerate", false);
config.AddConfigProperty<long>("targetFramerate", 90);
config.LoadJSONConfig("/system/lemon/lemonwm.json");
WM wm(displaySurface);
wm.Compositor().SetWallpaper(config.GetConfigProperty<std::string>("backgroundImage"));
wm.Compositor().SetShouldDisplayFramerate(config.GetConfigProperty<bool>("displayFramerate"));
wm.SetTargetFramerate(config.GetConfigProperty<long>("targetFramerate"));
wm.Run();
return 0;
}