mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-11-04 09:42:42 +01:00 
			
		
		
		
	fix: lint
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user