2016-05-31 05:58:58 +02:00
|
|
|
#pragma once
|
2016-05-19 16:41:06 +02:00
|
|
|
|
2016-11-20 23:04:31 +01:00
|
|
|
#include "modules/meta/static_module.hpp"
|
2023-05-08 19:36:12 +02:00
|
|
|
#include "modules/meta/types.hpp"
|
2016-05-19 16:41:06 +02:00
|
|
|
|
2016-11-19 06:22:44 +01:00
|
|
|
POLYBAR_NS
|
2016-06-15 05:32:35 +02:00
|
|
|
|
|
|
|
namespace modules {
|
|
|
|
class text_module : public static_module<text_module> {
|
|
|
|
public:
|
2023-05-01 14:58:52 +02:00
|
|
|
explicit text_module(const bar_settings&, string, const config&);
|
2016-06-15 05:32:35 +02:00
|
|
|
|
2016-12-23 15:54:06 +01:00
|
|
|
void update() {}
|
2016-11-02 20:22:45 +01:00
|
|
|
string get_format() const;
|
|
|
|
string get_output();
|
2022-04-04 11:49:43 +02:00
|
|
|
bool build(builder* builder, const string& tag) const;
|
2020-05-15 19:59:08 +02:00
|
|
|
|
2023-05-08 19:36:12 +02:00
|
|
|
static constexpr auto TYPE = TEXT_TYPE;
|
2022-04-04 11:49:43 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
static constexpr const char* TAG_LABEL{"<label>"};
|
|
|
|
|
|
|
|
label_t m_label;
|
|
|
|
|
|
|
|
string m_format{DEFAULT_FORMAT};
|
2016-05-19 16:41:06 +02:00
|
|
|
};
|
2022-04-04 11:49:43 +02:00
|
|
|
} // namespace modules
|
2016-06-15 05:32:35 +02:00
|
|
|
|
2016-11-19 06:22:44 +01:00
|
|
|
POLYBAR_NS_END
|