polybar-dwm/include/modules/meta/static_module.hpp
patrick96 f55f584ef7 Remove main thread from static_module
This removes the need for any kind of synchronization because static
modules are completely running in the controller thread.
2021-09-30 15:38:18 +02:00

25 lines
407 B
C++

#pragma once
#include "modules/meta/base.hpp"
POLYBAR_NS
namespace modules {
template <class Impl>
class static_module : public module<Impl> {
public:
using module<Impl>::module;
void start() override {
CAST_MOD(Impl)->update();
CAST_MOD(Impl)->broadcast();
}
bool build(builder*, string) const {
return true;
}
};
} // namespace modules
POLYBAR_NS_END