fix: lint
This commit is contained in:
parent
eec0a8255f
commit
7bbf7c99a3
|
@ -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&);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue