fix: reload style
This commit is contained in:
		
							parent
							
								
									fb6658e8fd
								
							
						
					
					
						commit
						6dcae2cade
					
				| 
						 | 
					@ -270,9 +270,18 @@ int waybar::Client::main(int argc, char *argv[]) {
 | 
				
			||||||
    setupCss(css_file);
 | 
					    setupCss(css_file);
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (config.getConfig()["reload_style_on_change"].asBool()) {
 | 
					  auto config = config.getConfig();
 | 
				
			||||||
 | 
					  if (config.isObject() && config["reload_style_on_change"].asBool()) {
 | 
				
			||||||
    m_cssReloadHelper->monitorChanges();
 | 
					    m_cssReloadHelper->monitorChanges();
 | 
				
			||||||
 | 
					  } else if (config.isArray()) {
 | 
				
			||||||
 | 
					    for (const auto &conf : config) {
 | 
				
			||||||
 | 
					      if (conf["reload_style_on_change"].asBool()) {
 | 
				
			||||||
 | 
					        m_cssReloadHelper->monitorChanges();
 | 
				
			||||||
 | 
					        break;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  bindInterfaces();
 | 
					  bindInterfaces();
 | 
				
			||||||
  gtk_app->hold();
 | 
					  gtk_app->hold();
 | 
				
			||||||
  gtk_app->run();
 | 
					  gtk_app->run();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue