mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 23:45:58 +01:00
hyprctl: fix plugin list on no plugins (#5357)
This commit is contained in:
parent
9e8f051896
commit
8cb38d41d2
1 changed files with 4 additions and 1 deletions
|
@ -1451,6 +1451,9 @@ std::string dispatchPlugin(eHyprCtlOutputFormat format, std::string request) {
|
||||||
} else if (OPERATION == "list") {
|
} else if (OPERATION == "list") {
|
||||||
const auto PLUGINS = g_pPluginSystem->getAllPlugins();
|
const auto PLUGINS = g_pPluginSystem->getAllPlugins();
|
||||||
|
|
||||||
|
if (PLUGINS.size() == 0)
|
||||||
|
return "no plugins loaded";
|
||||||
|
|
||||||
std::string list = "";
|
std::string list = "";
|
||||||
for (auto& p : PLUGINS) {
|
for (auto& p : PLUGINS) {
|
||||||
list += std::format("\nPlugin {} by {}:\n\tHandle: {:x}\n\tVersion: {}\n\tDescription: {}\n", p->name, p->author, (uintptr_t)p->m_pHandle, p->version, p->description);
|
list += std::format("\nPlugin {} by {}:\n\tHandle: {:x}\n\tVersion: {}\n\tDescription: {}\n", p->name, p->author, (uintptr_t)p->m_pHandle, p->version, p->description);
|
||||||
|
|
Loading…
Reference in a new issue