#pragma once #include "../helpers/Log.hpp" #include #include #include #include class CConfigManager { public: CConfigManager(std::string configPath); void init(); struct STimeoutRule { uint64_t timeout = 0; std::string onTimeout = ""; std::string onResume = ""; bool ignoreInhibit = false; }; std::vector getRules(); std::optional handleSource(const std::string&, const std::string&); std::string configCurrentPath, configHeadPath; std::set alreadyIncludedSourceFiles; template Hyprlang::CSimpleConfigValue getValue(const std::string& name) { return Hyprlang::CSimpleConfigValue(&m_config, name.c_str()); } private: Hyprlang::CConfig m_config; std::vector m_vRules; Hyprlang::CParseResult postParse(); }; inline std::unique_ptr g_pConfigManager;