diff --git a/man/waybar-tray.5.scd b/man/waybar-tray.5.scd index c664594..bfd1f29 100644 --- a/man/waybar-tray.5.scd +++ b/man/waybar-tray.5.scd @@ -29,6 +29,10 @@ Addressed by *tray* typeof: integer ++ Defines the spacing between the tray icons. +*reverse-direction*: ++ + typeof: bool ++ + Defines if new app icons should be added in a reverse order + *on-update*: ++ typeof: string ++ Command to execute when the module is updated. diff --git a/src/modules/sni/tray.cpp b/src/modules/sni/tray.cpp index 4606857..94120be 100644 --- a/src/modules/sni/tray.cpp +++ b/src/modules/sni/tray.cpp @@ -25,7 +25,11 @@ Tray::Tray(const std::string& id, const Bar& bar, const Json::Value& config) } void Tray::onAdd(std::unique_ptr& item) { - box_.pack_end(item->event_box); + if (config_["reverse-direction"].isBool() && config_["reverse-direction"].asBool()) { + box_.pack_end(item->event_box); + } else { + box_.pack_start(item->event_box); + } dp.emit(); }