Merge pull request #2926 from alebastr/meson-cleanup

build: refactorings and deprecation fixes
This commit is contained in:
Alexis Rouillard
2024-02-19 23:44:52 +01:00
committed by GitHub
8 changed files with 195 additions and 169 deletions

View File

@ -16,7 +16,7 @@ waybar::AModule* waybar::Factory::makeModule(const std::string& name,
auto hash_pos = name.find('#');
auto ref = name.substr(0, hash_pos);
auto id = hash_pos != std::string::npos ? name.substr(hash_pos + 1) : "";
#if defined(__FreeBSD__) || (defined(__linux__) && !defined(NO_FILESYSTEM))
#if defined(__FreeBSD__) || defined(__linux__)
if (ref == "battery") {
return new waybar::modules::Battery(id, bar_, config_[name]);
}
@ -58,16 +58,16 @@ waybar::AModule* waybar::Factory::makeModule(const std::string& name,
return new waybar::modules::sway::Scratchpad(id, config_[name]);
}
#endif
#ifdef HAVE_WLR
#ifdef HAVE_WLR_TASKBAR
if (ref == "wlr/taskbar") {
return new waybar::modules::wlr::Taskbar(id, bar_, config_[name]);
}
#ifdef USE_EXPERIMENTAL
#endif
#ifdef HAVE_WLR_WORKSPACES
if (ref == "wlr/workspaces") {
return new waybar::modules::wlr::WorkspaceManager(id, bar_, config_[name]);
}
#endif
#endif
#ifdef HAVE_RIVER
if (ref == "river/mode") {
return new waybar::modules::river::Mode(id, bar_, config_[name]);
@ -178,10 +178,12 @@ waybar::AModule* waybar::Factory::makeModule(const std::string& name,
return new waybar::modules::Sndio(id, config_[name]);
}
#endif
#ifdef HAVE_GIO_UNIX
#if defined(__linux__)
if (ref == "bluetooth") {
return new waybar::modules::Bluetooth(id, config_[name]);
}
#endif
#ifdef HAVE_LOGIND_INHIBITOR
if (ref == "inhibitor") {
return new waybar::modules::Inhibitor(id, bar_, config_[name]);
}