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