2022-04-15 21:50:04 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "common.hpp"
|
|
|
|
#include "components/bar.hpp"
|
|
|
|
#include "modules/meta/static_module.hpp"
|
2022-08-28 13:15:48 +00:00
|
|
|
#include "x11/tray_manager.hpp"
|
2022-04-15 21:50:04 +00:00
|
|
|
|
|
|
|
POLYBAR_NS
|
|
|
|
namespace modules {
|
|
|
|
class tray_module : public static_module<tray_module>,
|
|
|
|
public signal_receiver<SIGN_PRIORITY_TRAY, signals::ui_tray::tray_width_change> {
|
|
|
|
public:
|
|
|
|
explicit tray_module(const bar_settings& bar_settings, string name_);
|
|
|
|
string get_format() const;
|
|
|
|
|
2022-08-28 13:15:48 +00:00
|
|
|
void start() override;
|
|
|
|
|
2022-04-15 21:50:04 +00:00
|
|
|
bool build(builder* builder, const string& tag) const;
|
|
|
|
void update() {}
|
|
|
|
void teardown();
|
|
|
|
|
|
|
|
bool on(const signals::ui_tray::tray_width_change& evt) override;
|
|
|
|
|
|
|
|
static constexpr auto TYPE = "internal/tray";
|
|
|
|
|
|
|
|
private:
|
|
|
|
static constexpr const char* TAG_TRAY{"<tray>"};
|
|
|
|
|
2022-08-28 13:15:48 +00:00
|
|
|
tray_manager m_tray;
|
2022-04-15 21:50:04 +00:00
|
|
|
};
|
2022-08-28 13:15:48 +00:00
|
|
|
} // namespace modules
|
2022-04-15 21:50:04 +00:00
|
|
|
POLYBAR_NS_END
|