mirror of
https://github.com/hyprwm/hypridle.git
synced 2025-12-21 09:30:02 +01:00
31 lines
560 B
C++
31 lines
560 B
C++
|
|
#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();
|
||
|
|
|
||
|
|
private:
|
||
|
|
Hyprlang::CConfig m_config;
|
||
|
|
|
||
|
|
std::vector<STimeoutRule> m_vRules;
|
||
|
|
|
||
|
|
Hyprlang::CParseResult postParse();
|
||
|
|
};
|
||
|
|
|
||
|
|
inline std::unique_ptr<CConfigManager> g_pConfigManager;
|