summaryrefslogtreecommitdiff
path: root/src/config/ConfigManager.hpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2025-01-19 15:39:19 +0100
committervaxerski <vaxry@vaxry.net>2025-01-19 16:11:12 +0100
commit8dd2cd41fb4c5a5eb6886cc190419b36084cabfa (patch)
tree713dfeb4f2bf75c2a04ed93166b5f9109dac9a84 /src/config/ConfigManager.hpp
parent0a0e56d99c3b5f900ec561b3fe9a3c8a64fe1217 (diff)
core: move to inotify for monitoring the config files
instead of manually polling every second which is not efficient, use inotify. an added bonus is that inotify is much much faster
Diffstat (limited to 'src/config/ConfigManager.hpp')
-rw-r--r--src/config/ConfigManager.hpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp
index bef52584..1962e4d2 100644
--- a/src/config/ConfigManager.hpp
+++ b/src/config/ConfigManager.hpp
@@ -142,8 +142,8 @@ class CConfigManager {
public:
CConfigManager();
- void tick();
void init();
+ void reload();
int getDeviceInt(const std::string&, const std::string&, const std::string& fallback = "");
float getDeviceFloat(const std::string&, const std::string&, const std::string& fallback = "");
@@ -258,15 +258,13 @@ class CConfigManager {
{"scrolltouchpad", [](const PHLWINDOW& pWindow) { return &pWindow->m_sWindowData.scrollTouchpad; }}};
bool m_bWantsMonitorReload = false;
- bool m_bForceReload = false;
bool m_bNoMonitorReload = false;
bool isLaunchingExecOnce = false; // For exec-once to skip initial ws tracking
private:
std::unique_ptr<Hyprlang::CConfig> m_pConfig;
- std::vector<std::string> configPaths; // stores all the config paths
- std::unordered_map<std::string, time_t> configModifyTimes; // stores modify times
+ std::vector<std::string> m_configPaths;
Hyprutils::Animation::CAnimationConfigTree m_AnimationTree;
@@ -302,7 +300,6 @@ class CConfigManager {
std::optional<std::string> generateConfig(std::string configPath);
std::optional<std::string> verifyConfigExists();
void postConfigReload(const Hyprlang::CParseResult& result);
- void reload();
SWorkspaceRule mergeWorkspaceRules(const SWorkspaceRule&, const SWorkspaceRule&);
};