feat(tray): spacing config
This commit is contained in:
parent
5010227e6b
commit
07d8dfb3d6
|
@ -26,6 +26,9 @@
|
||||||
"sway/window": {
|
"sway/window": {
|
||||||
"max-length": 50
|
"max-length": 50
|
||||||
},
|
},
|
||||||
|
"tray": {
|
||||||
|
"spacing": 10
|
||||||
|
},
|
||||||
"clock": {
|
"clock": {
|
||||||
"format-alt": "{:%Y-%m-%d}"
|
"format-alt": "{:%Y-%m-%d}"
|
||||||
},
|
},
|
||||||
|
|
|
@ -93,4 +93,4 @@ window#waybar {
|
||||||
|
|
||||||
#tray {
|
#tray {
|
||||||
background-color: #2980b9;
|
background-color: #2980b9;
|
||||||
}
|
}
|
|
@ -3,7 +3,12 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
waybar::modules::SNI::Tray::Tray(const Json::Value &config)
|
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 {
|
auto waybar::modules::SNI::Tray::update() -> void {
|
||||||
for (auto &item : host_.items) {
|
for (auto &item : host_.items) {
|
||||||
|
|
Loading…
Reference in New Issue