feat: add warning about tray requirements
This commit is contained in:
parent
232073ca17
commit
ed240ac105
|
@ -1,4 +1,5 @@
|
||||||
#include "modules/sni/tray.hpp"
|
#include "modules/sni/tray.hpp"
|
||||||
|
#include <spdlog/spdlog.h>
|
||||||
|
|
||||||
namespace waybar::modules::SNI {
|
namespace waybar::modules::SNI {
|
||||||
|
|
||||||
|
@ -9,6 +10,9 @@ Tray::Tray(const std::string& id, const Bar& bar, const Json::Value& config)
|
||||||
host_(nb_hosts_, config, std::bind(&Tray::onAdd, this, std::placeholders::_1),
|
host_(nb_hosts_, config, std::bind(&Tray::onAdd, this, std::placeholders::_1),
|
||||||
std::bind(&Tray::onRemove, this, std::placeholders::_1)) {
|
std::bind(&Tray::onRemove, this, std::placeholders::_1)) {
|
||||||
box_.set_name("tray");
|
box_.set_name("tray");
|
||||||
|
spdlog::warn(
|
||||||
|
"For a functionnal tray you must have libappindicator-* installed and export "
|
||||||
|
"XDG_CURRENT_DESKTOP=Unity");
|
||||||
if (!id.empty()) {
|
if (!id.empty()) {
|
||||||
box_.get_style_context()->add_class(id);
|
box_.get_style_context()->add_class(id);
|
||||||
}
|
}
|
||||||
|
@ -39,4 +43,4 @@ auto Tray::update() -> void {
|
||||||
|
|
||||||
Tray::operator Gtk::Widget&() { return box_; }
|
Tray::operator Gtk::Widget&() { return box_; }
|
||||||
|
|
||||||
}
|
} // namespace waybar::modules::SNI
|
||||||
|
|
Loading…
Reference in New Issue