mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-07-31 12:11:56 -07:00
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user