From 7bbf7c99a377717d1c2d625bc04b161f813a71dc Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 4 May 2022 17:29:08 +0200 Subject: [PATCH] fix: lint --- include/modules/idle_inhibitor.hpp | 2 +- src/modules/idle_inhibitor.cpp | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/include/modules/idle_inhibitor.hpp b/include/modules/idle_inhibitor.hpp index 334c8e20..ac0bcf02 100644 --- a/include/modules/idle_inhibitor.hpp +++ b/include/modules/idle_inhibitor.hpp @@ -9,7 +9,7 @@ namespace waybar::modules { class IdleInhibitor : public ALabel { - sigc::connection timeout_; + sigc::connection timeout_; public: IdleInhibitor(const std::string&, const waybar::Bar&, const Json::Value&); diff --git a/src/modules/idle_inhibitor.cpp b/src/modules/idle_inhibitor.cpp index fed64b27..0cea6d99 100644 --- a/src/modules/idle_inhibitor.cpp +++ b/src/modules/idle_inhibitor.cpp @@ -81,18 +81,20 @@ bool waybar::modules::IdleInhibitor::handleToggle(GdkEventButton* const& e) { auto timeoutMins = config_["timeout"].asDouble(); int timeoutSecs = timeoutMins * 60; - timeout_ = Glib::signal_timeout().connect_seconds([]() { - /* intentionally not tied to a module instance lifetime - * as the output with `this` can be disconnected - */ - spdlog::info("deactivating idle_inhibitor by timeout"); - status = false; - for (auto const& module : waybar::modules::IdleInhibitor::modules) { - module->update(); - } - /* disconnect */ - return false; - }, timeoutSecs); + timeout_ = Glib::signal_timeout().connect_seconds( + []() { + /* intentionally not tied to a module instance lifetime + * as the output with `this` can be disconnected + */ + spdlog::info("deactivating idle_inhibitor by timeout"); + status = false; + for (auto const& module : waybar::modules::IdleInhibitor::modules) { + module->update(); + } + /* disconnect */ + return false; + }, + timeoutSecs); } // Make all other idle inhibitor modules update