2016-11-20 17:04:31 -05:00
|
|
|
#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;
|
|
|
|
|
2021-01-04 04:38:43 -05:00
|
|
|
void start() override {
|
2017-01-27 07:29:10 -05:00
|
|
|
this->m_mainthread = thread([&] {
|
|
|
|
this->m_log.trace("%s: Thread id = %i", this->name(), concurrency_util::thread_id(this_thread::get_id()));
|
|
|
|
CAST_MOD(Impl)->update();
|
|
|
|
CAST_MOD(Impl)->broadcast();
|
|
|
|
});
|
2016-12-21 03:21:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bool build(builder*, string) const {
|
|
|
|
return true;
|
|
|
|
}
|
2016-11-20 17:04:31 -05:00
|
|
|
};
|
2021-01-04 04:38:43 -05:00
|
|
|
} // namespace modules
|
2016-11-20 17:04:31 -05:00
|
|
|
|
|
|
|
POLYBAR_NS_END
|