mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
fix(swaybar-ipc): better logs
This commit is contained in:
parent
5baffbf8f8
commit
6bfb674d1b
@ -18,7 +18,6 @@ struct swaybar_config {
|
|||||||
std::string id;
|
std::string id;
|
||||||
std::string mode;
|
std::string mode;
|
||||||
std::string hidden_state;
|
std::string hidden_state;
|
||||||
std::string position;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -43,9 +43,6 @@ struct swaybar_config parseConfig(const Json::Value& payload) {
|
|||||||
if (auto hs = payload["hidden_state"]; hs.isString()) {
|
if (auto hs = payload["hidden_state"]; hs.isString()) {
|
||||||
conf.hidden_state = hs.asString();
|
conf.hidden_state = hs.asString();
|
||||||
}
|
}
|
||||||
if (auto position = payload["position"]; position.isString()) {
|
|
||||||
conf.position = position.asString();
|
|
||||||
}
|
|
||||||
return conf;
|
return conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,13 +77,17 @@ void BarIpcClient::onIpcEvent(const struct Ipc::ipc_response& res) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void BarIpcClient::onConfigUpdate(const swaybar_config& config) {
|
void BarIpcClient::onConfigUpdate(const swaybar_config& config) {
|
||||||
spdlog::info("config update: {} {} {}", config.id, config.mode, config.position);
|
spdlog::info("config update for {}: id {}, mode {}, hidden_state {}",
|
||||||
|
bar_.bar_id,
|
||||||
|
config.id,
|
||||||
|
config.mode,
|
||||||
|
config.hidden_state);
|
||||||
bar_config_ = config;
|
bar_config_ = config;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BarIpcClient::onVisibilityUpdate(bool visible_by_modifier) {
|
void BarIpcClient::onVisibilityUpdate(bool visible_by_modifier) {
|
||||||
spdlog::trace("visiblity update: {}", visible_by_modifier);
|
spdlog::debug("visiblity update for {}: {}", bar_.bar_id, visible_by_modifier);
|
||||||
visible_by_modifier_ = visible_by_modifier;
|
visible_by_modifier_ = visible_by_modifier;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user