hypridle/src/config/ConfigManager.hpp

34 lines
682 B
C++
Raw Normal View History

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::string getOnTimeoutCommand();
2024-02-17 19:30:11 +00:00
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;