-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmain.cpp
35 lines (23 loc) · 874 Bytes
/
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
31
32
33
34
35
#define WLR_USE_UNSTABLE
#include <hyprland/src/config/ConfigManager.hpp>
#include "globals.hpp"
#include "riverLayout.hpp"
#include "RiverLayoutProtocolManager.hpp"
#include <unistd.h>
#include <thread>
// Methods
// Do NOT change this function.
APICALL EXPORT std::string PLUGIN_API_VERSION() {
return HYPRLAND_API_VERSION;
}
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
PHANDLE = handle;
g_pRiverLayoutProtocolManager = std::make_unique<CRiverLayoutProtocolManager>();
HyprlandAPI::addConfigValue(PHANDLE, "plugin:river:layout:special_scale_factor", Hyprlang::FLOAT{0.8f});
HyprlandAPI::reloadConfig();
return {"River Layout", "Use River layout protocol", "Zakk", "1.0"};
}
APICALL EXPORT void PLUGIN_EXIT() {
g_pRiverLayoutProtocolManager.reset();
HyprlandAPI::invokeHyprctlCommand("seterror", "disable");
}