Factory. cava_frontend

This commit is contained in:
Viktar Lukashonak
2025-12-09 18:13:45 +03:00
parent 3773021546
commit e03119fe94
6 changed files with 48 additions and 20 deletions

View File

@@ -108,18 +108,13 @@
#ifdef HAVE_LIBWIREPLUMBER
#include "modules/wireplumber.hpp"
#endif
#ifdef HAVE_LIBCAVA
#include "modules/cava/cava.hpp"
#ifdef HAVE_LIBCAVAGLSL
#include "modules/cava/cavaGLSL.hpp"
#endif
#endif
#ifdef HAVE_SYSTEMD_MONITOR
#include "modules/systemd_failed_units.hpp"
#endif
#ifdef HAVE_LIBGPS
#include "modules/gps.hpp"
#endif
#include "modules/cava/cava_frontend.hpp"
#include "modules/cffi.hpp"
#include "modules/custom.hpp"
#include "modules/image.hpp"
@@ -344,15 +339,9 @@ waybar::AModule* waybar::Factory::makeModule(const std::string& name,
return new waybar::modules::Wireplumber(id, config_[name]);
}
#endif
#ifdef HAVE_LIBCAVA
if (ref == "cava") {
return new waybar::modules::cava::Cava(id, config_[name]);
#ifdef HAVE_LIBCAVAGLSL
} else if (ref == "cavaGLSL") {
return new waybar::modules::cava::CavaGLSL(id, config_[name]);
#endif
return waybar::modules::cava::getModule(id, config_[name]);
}
#endif
#ifdef HAVE_SYSTEMD_MONITOR
if (ref == "systemd-failed-units") {
return new waybar::modules::SystemdFailedUnits(id, config_[name]);