2024-02-17 19:30:11 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "../helpers/Log.hpp"
|
|
|
|
|
|
|
|
|
|
#include <hyprlang.hpp>
|
|
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
|
|
class CConfigManager {
|
|
|
|
|
public:
|
|
|
|
|
CConfigManager();
|
|
|
|
|
void init();
|
|
|
|
|
|
|
|
|
|
struct STimeoutRule {
|
|
|
|
|
uint64_t timeout = 0;
|
|
|
|
|
std::string onTimeout = "";
|
|
|
|
|
std::string onResume = "";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
std::vector<STimeoutRule> getRules();
|
2024-02-17 22:13:06 +00:00
|
|
|
void* const* getValuePtr(const std::string& name);
|
2024-02-17 19:30:11 +00:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Hyprlang::CConfig m_config;
|
|
|
|
|
|
|
|
|
|
std::vector<STimeoutRule> m_vRules;
|
|
|
|
|
|
|
|
|
|
Hyprlang::CParseResult postParse();
|
|
|
|
|
};
|
|
|
|
|
|
2024-02-17 22:13:06 +00:00
|
|
|
inline std::unique_ptr<CConfigManager> g_pConfigManager;
|