mirror of
https://github.com/polybar/polybar.git
synced 2024-10-27 05:23:39 -04:00
d592eea966
This allows us to identify module by their type and it is also better to store the module type as part of the module instead of having it hardcoded in factory.hpp
24 lines
487 B
C++
24 lines
487 B
C++
#pragma once
|
|
|
|
#include "modules/meta/timer_module.hpp"
|
|
|
|
POLYBAR_NS
|
|
|
|
namespace modules {
|
|
class counter_module : public timer_module<counter_module> {
|
|
public:
|
|
explicit counter_module(const bar_settings&, string);
|
|
|
|
bool update();
|
|
bool build(builder* builder, const string& tag) const;
|
|
|
|
static constexpr auto TYPE = "internal/counter";
|
|
|
|
private:
|
|
static constexpr auto TAG_COUNTER = "<counter>";
|
|
|
|
int m_counter{0};
|
|
};
|
|
} // namespace modules
|
|
|
|
POLYBAR_NS_END
|