Repository: hyprwm/Hyprland
File: hyprpm/src/core/PluginManager.cpp (C++)

Code before:
    for (auto const& r : REPOS) {
        for (auto const& p : r.plugins) {
            if (!p.enabled)
                continue;

            if (!forceReload && std::find_if(loadedPlugins.begin(), loadedPlugins.end(), [&](const auto& other) { return other == p.name; }) != loadedPlugins.end())
                continue;

            if (!loadUnloadPlugin(HYPRPMPATH / repoForName(p.name) / p.filename, true)) {
                std::println("{}", infoString("{} will be loaded after restarting Hyprland", p.name));
                hyprlandVersionMismatch = true;
            } else
                std::println("{}", successString("Loaded {}", p.name));
        }
    }

    std::println("{}", successString("Plugin load state ensured"));

    return hyprlandVersionMismatch ? LOADSTATE_HYPRLAND_UPDATED : LOADSTATE_OK;
}

bool CPluginManager::loadUnloadPlugin(const std::string& path, bool load) {
    auto state = DataState::getGlobalState();
    auto HLVER = getHyprlandVersion(true);

    if (state.headersAbiCompiled != HLVER.hash) {
        if (load)
            std::println("{}", infoString("Running Hyprland version ({}) differs from plugin state ({}), please restart Hyprland.", HLVER.hash, state.headersAbiCompiled));
        return false;
    }

    if (load)
        NHyprlandSocket::send("/plugin load " + path);
    else
        NHyprlandSocket::send("/plugin unload " + path);

    return true;
}

void CPluginManager::listAllPlugins() {
    const auto REPOS = DataState::getAllRepositories();

    for (auto const& r : REPOS) {
        std::println("{}", infoString("Repository {}:", r.name));

        for (auto const& p : r.plugins) {
            std::println("  │ Plugin {}", p.name);

            if (!p.failed)
                std::println("  └─ enabled: {}", (p.enabled ? std::string{Colors::GREEN} + "true" : std::string{Colors::RED} + "false"));
            else

Review comment (suggestion):
```suggestion
    if (state.headersAbiCompiled != HLVER.abiHash) {
```

Code after:
    for (auto const& r : REPOS) {
        for (auto const& p : r.plugins) {
            if (!p.enabled)
                continue;

            if (!forceReload && std::find_if(loadedPlugins.begin(), loadedPlugins.end(), [&](const auto& other) { return other == p.name; }) != loadedPlugins.end())
                continue;

            if (!loadUnloadPlugin(HYPRPMPATH / repoForName(p.name) / p.filename, true)) {
                std::println("{}", infoString("{} will be loaded after restarting Hyprland", p.name));
                hyprlandVersionMismatch = true;
            } else
                std::println("{}", successString("Loaded {}", p.name));
        }
    }

    std::println("{}", successString("Plugin load state ensured"));

    return hyprlandVersionMismatch ? LOADSTATE_HYPRLAND_UPDATED : LOADSTATE_OK;
}

bool CPluginManager::loadUnloadPlugin(const std::string& path, bool load) {
    auto state = DataState::getGlobalState();
    auto HLVER = getHyprlandVersion(true);

    if (state.headersAbiCompiled != HLVER.abiHash) {
        if (load)
            std::println("{}", infoString("Running Hyprland version ({}) differs from plugin state ({}), please restart Hyprland.", HLVER.hash, state.headersAbiCompiled));
        return false;
    }

    if (load)
        NHyprlandSocket::send("/plugin load " + path);
    else
        NHyprlandSocket::send("/plugin unload " + path);

    return true;
}

void CPluginManager::listAllPlugins() {
    const auto REPOS = DataState::getAllRepositories();

    for (auto const& r : REPOS) {
        std::println("{}", infoString("Repository {}:", r.name));

        for (auto const& p : r.plugins) {
            std::println("  │ Plugin {}", p.name);

            if (!p.failed)
                std::println("  └─ enabled: {}", (p.enabled ? std::string{Colors::GREEN} + "true" : std::string{Colors::RED} + "false"));
            else