polybar-dwm/include/modules/text.hpp

30 lines
616 B
C++
Raw Normal View History

#pragma once
2016-05-19 14:41:06 +00:00
2016-11-20 22:04:31 +00:00
#include "modules/meta/static_module.hpp"
#include "modules/meta/types.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:
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();
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 14:41:06 +00:00
};
} // namespace modules
2016-06-15 03:32:35 +00:00
2016-11-19 05:22:44 +00:00
POLYBAR_NS_END