diff --git a/resources/config b/resources/config index 45b6a0af..b953858c 100644 --- a/resources/config +++ b/resources/config @@ -26,6 +26,9 @@ "sway/window": { "max-length": 50 }, + "tray": { + "spacing": 10 + }, "clock": { "format-alt": "{:%Y-%m-%d}" }, diff --git a/resources/style.css b/resources/style.css index d15c8947..0eb1680d 100644 --- a/resources/style.css +++ b/resources/style.css @@ -93,4 +93,4 @@ window#waybar { #tray { background-color: #2980b9; -} +} \ No newline at end of file diff --git a/src/modules/sni/tray.cpp b/src/modules/sni/tray.cpp index 92d2b189..c29ad9d4 100644 --- a/src/modules/sni/tray.cpp +++ b/src/modules/sni/tray.cpp @@ -3,7 +3,12 @@ #include waybar::modules::SNI::Tray::Tray(const Json::Value &config) - : config_(config), watcher_(), host_(&dp) {} + : config_(config), watcher_(), host_(&dp) +{ + if (config_["spacing"].isUInt()) { + box_.set_spacing(config_["spacing"].asUInt()); + } +} auto waybar::modules::SNI::Tray::update() -> void { for (auto &item : host_.items) {