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
This commit is contained in:
parent
dc469dc4c1
commit
3a631e40db
6 changed files with 86 additions and 8 deletions
|
|
@ -182,6 +182,8 @@ class CConfigManager {
|
|||
|
||||
void addExecRule(const SExecRequestedRule&);
|
||||
|
||||
void handlePluginLoads();
|
||||
|
||||
std::string configCurrentPath;
|
||||
|
||||
private:
|
||||
|
|
@ -203,6 +205,7 @@ class CConfigManager {
|
|||
|
||||
std::vector<SExecRequestedRule> execRequestedRules; // rules requested with exec, e.g. [workspace 2] kitty
|
||||
|
||||
std::vector<std::string> m_vDeclaredPlugins;
|
||||
std::unordered_map<HANDLE, std::unique_ptr<std::unordered_map<std::string, SConfigValue>>> 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<CConfigManager> g_pConfigManager;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue