feat(swaybar-ipc): handle mode update

This commit is contained in:
Aleksei Bavshin 2021-09-15 22:39:51 +07:00
parent 23e5181cac
commit bc13453155
No known key found for this signature in database
GPG Key ID: 4F071603387A382A

View File

@ -81,7 +81,8 @@ 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: {} {} {}", config.id, config.mode, config.position);
// TODO: pass config to bars bar_config_ = config;
bar_.setMode(bar_config_.mode);
} }
void BarIpcClient::onVisibilityUpdate(bool visible_by_modifier) { void BarIpcClient::onVisibilityUpdate(bool visible_by_modifier) {