Skip to content

Commit 2c9b7ed

Browse files
committed
fix(swaybar-ipc): better logs
1 parent 137f854 commit 2c9b7ed

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

include/modules/sway/bar.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ struct swaybar_config {
1818
std::string id;
1919
std::string mode;
2020
std::string hidden_state;
21-
std::string position;
2221
};
2322

2423
/**

src/modules/sway/bar.cpp

+6-5
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ struct swaybar_config parseConfig(const Json::Value& payload) {
4343
if (auto hs = payload["hidden_state"]; hs.isString()) {
4444
conf.hidden_state = hs.asString();
4545
}
46-
if (auto position = payload["position"]; position.isString()) {
47-
conf.position = position.asString();
48-
}
4946
return conf;
5047
}
5148

@@ -80,13 +77,17 @@ void BarIpcClient::onIpcEvent(const struct Ipc::ipc_response& res) {
8077
}
8178

8279
void BarIpcClient::onConfigUpdate(const swaybar_config& config) {
83-
spdlog::info("config update: {} {} {}", config.id, config.mode, config.position);
80+
spdlog::info("config update for {}: id {}, mode {}, hidden_state {}",
81+
bar_.bar_id,
82+
config.id,
83+
config.mode,
84+
config.hidden_state);
8485
bar_config_ = config;
8586
update();
8687
}
8788

8889
void BarIpcClient::onVisibilityUpdate(bool visible_by_modifier) {
89-
spdlog::trace("visiblity update: {}", visible_by_modifier);
90+
spdlog::debug("visiblity update for {}: {}", bar_.bar_id, visible_by_modifier);
9091
visible_by_modifier_ = visible_by_modifier;
9192
update();
9293
}

0 commit comments

Comments
 (0)