mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-25 19:09:48 +01:00
minor fixes
This commit is contained in:
parent
838ea2c9aa
commit
3566efa667
3 changed files with 10 additions and 4 deletions
|
@ -1171,8 +1171,11 @@ void* const* CConfigManager::getConfigValuePtr(const std::string& val) {
|
||||||
return VAL->getDataStaticPtr();
|
return VAL->getDataStaticPtr();
|
||||||
}
|
}
|
||||||
|
|
||||||
Hyprlang::CConfigValue* CConfigManager::getHyprlangConfigValuePtr(const std::string& val) {
|
Hyprlang::CConfigValue* CConfigManager::getHyprlangConfigValuePtr(const std::string& name, const std::string& specialCat) {
|
||||||
return m_pConfig->getConfigValuePtr(val.c_str());
|
if (!specialCat.empty())
|
||||||
|
return m_pConfig->getSpecialConfigValuePtr(specialCat.c_str(), name.c_str(), nullptr);
|
||||||
|
|
||||||
|
return m_pConfig->getConfigValuePtr(name.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CConfigManager::deviceConfigExists(const std::string& dev) {
|
bool CConfigManager::deviceConfigExists(const std::string& dev) {
|
||||||
|
@ -1378,7 +1381,7 @@ void CConfigManager::removePluginConfig(HANDLE handle) {
|
||||||
if (h != handle)
|
if (h != handle)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
m_pConfig->removeSpecialConfigValue("plugin:", n.c_str());
|
m_pConfig->removeSpecialConfigValue("plugin", n.c_str());
|
||||||
}
|
}
|
||||||
std::erase_if(pluginVariables, [handle](const auto& other) { return other.handle == handle; });
|
std::erase_if(pluginVariables, [handle](const auto& other) { return other.handle == handle; });
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ class CConfigManager {
|
||||||
bool shouldBlurLS(const std::string&);
|
bool shouldBlurLS(const std::string&);
|
||||||
|
|
||||||
void* const* getConfigValuePtr(const std::string&);
|
void* const* getConfigValuePtr(const std::string&);
|
||||||
Hyprlang::CConfigValue* getHyprlangConfigValuePtr(const std::string&);
|
Hyprlang::CConfigValue* getHyprlangConfigValuePtr(const std::string& name, const std::string& specialCat = "");
|
||||||
void onPluginLoadUnload(const std::string& name, bool load);
|
void onPluginLoadUnload(const std::string& name, bool load);
|
||||||
static std::string getConfigDir();
|
static std::string getConfigDir();
|
||||||
static std::string getMainConfigPath();
|
static std::string getMainConfigPath();
|
||||||
|
|
|
@ -182,6 +182,9 @@ APICALL Hyprlang::CConfigValue* HyprlandAPI::getConfigValue(HANDLE handle, const
|
||||||
if (!PLUGIN)
|
if (!PLUGIN)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
if (name.starts_with("plugin:"))
|
||||||
|
return g_pConfigManager->getHyprlangConfigValuePtr(name.substr(7), "plugin");
|
||||||
|
|
||||||
return g_pConfigManager->getHyprlangConfigValuePtr(name);
|
return g_pConfigManager->getHyprlangConfigValuePtr(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue