polybar-dwm/include/modules/text.hpp

30 lines
616 B
C++
Raw Normal View History

#pragma once
2016-05-19 16:41:06 +02:00
2016-11-20 23:04:31 +01:00
#include "modules/meta/static_module.hpp"
#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:
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();
bool build(builder* builder, const string& tag) const;
static constexpr auto TYPE = TEXT_TYPE;
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
};
} // namespace modules
2016-06-15 05:32:35 +02:00
2016-11-19 06:22:44 +01:00
POLYBAR_NS_END