2016-10-11 04:05:03 -04:00
|
|
|
#pragma once
|
|
|
|
|
2016-11-20 17:04:31 -05:00
|
|
|
#include "modules/meta/event_module.hpp"
|
|
|
|
#include "modules/meta/timer_module.hpp"
|
2016-10-11 04:05:03 -04:00
|
|
|
|
|
|
|
#define DEFINE_UNSUPPORTED_MODULE(MODULE_NAME, MODULE_TYPE) \
|
|
|
|
class MODULE_NAME : public module<MODULE_NAME> { \
|
|
|
|
public: \
|
|
|
|
using module<MODULE_NAME>::module; \
|
|
|
|
MODULE_NAME(const bar_settings b, const logger& l, const config& c, string n) \
|
|
|
|
: module<MODULE_NAME>::module(b, l, c, n) { \
|
|
|
|
throw application_error("No built-in support for '" + string{MODULE_TYPE} + "'"); \
|
|
|
|
} \
|
|
|
|
void start() {} \
|
2016-10-18 19:26:17 -04:00
|
|
|
bool build(builder*, string) const { \
|
2016-10-11 04:05:03 -04:00
|
|
|
return true; \
|
|
|
|
} \
|
|
|
|
}
|
|
|
|
|
2016-11-19 00:22:44 -05:00
|
|
|
POLYBAR_NS
|
2016-10-11 04:05:03 -04:00
|
|
|
|
|
|
|
namespace modules {
|
|
|
|
#if not ENABLE_I3
|
|
|
|
DEFINE_UNSUPPORTED_MODULE(i3_module, "internal/i3");
|
|
|
|
#endif
|
|
|
|
#if not ENABLE_MPD
|
|
|
|
DEFINE_UNSUPPORTED_MODULE(mpd_module, "internal/mpd");
|
|
|
|
#endif
|
|
|
|
#if not ENABLE_NETWORK
|
|
|
|
DEFINE_UNSUPPORTED_MODULE(network_module, "internal/network");
|
|
|
|
#endif
|
|
|
|
#if not ENABLE_ALSA
|
|
|
|
DEFINE_UNSUPPORTED_MODULE(volume_module, "internal/volume");
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2016-11-19 00:22:44 -05:00
|
|
|
POLYBAR_NS_END
|