From 3a631e40db78f98ab82bb600d7cf9d7428bc2b02 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Mon, 1 May 2023 07:10:53 -0700 Subject: Declarative plugin management (#2180) * Declarative plugin management Allow declaring `plugin` entries in the hyprland configuration. Plugins will be loaded if an entry is added and unloaded if that entry is removed. * Replace pointers with copying in updateconfigPlugins * Include which plugin was declared twice in error --- src/config/ConfigManager.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/config/ConfigManager.hpp') diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp index cee6075e..0d4d6cd7 100644 --- a/src/config/ConfigManager.hpp +++ b/src/config/ConfigManager.hpp @@ -182,6 +182,8 @@ class CConfigManager { void addExecRule(const SExecRequestedRule&); + void handlePluginLoads(); + std::string configCurrentPath; private: @@ -203,6 +205,7 @@ class CConfigManager { std::vector execRequestedRules; // rules requested with exec, e.g. [workspace 2] kitty + std::vector m_vDeclaredPlugins; std::unordered_map>> pluginConfigs; // stores plugin configs bool isFirstLaunch = true; // For exec-once @@ -250,6 +253,7 @@ class CConfigManager { void handleBlurLS(const std::string&, const std::string&); void handleBindWS(const std::string&, const std::string&); void handleEnv(const std::string&, const std::string&); + void handlePlugin(const std::string&, const std::string&); }; inline std::unique_ptr g_pConfigManager; -- cgit v1.2.3