mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-10-31 16:02:43 +01:00 
			
		
		
		
	refactor(ALabel): add interval
This commit is contained in:
		| @@ -3,10 +3,11 @@ | ||||
|  | ||||
| #include <iostream> | ||||
|  | ||||
| waybar::ALabel::ALabel(const Json::Value& config, const std::string format) | ||||
| waybar::ALabel::ALabel(const Json::Value& config, const std::string format, uint16_t interval) | ||||
|   : config_(config), | ||||
|     format_(config_["format"].isString() ? config_["format"].asString() : format), | ||||
|     default_format_(format_) | ||||
|     interval_(std::chrono::seconds(config_["interval"].isUInt() | ||||
|       ? config_["interval"].asUInt() : interval)), default_format_(format_) | ||||
| { | ||||
|   event_box_.add(label_); | ||||
| 	if (config_["max-length"].isUInt()) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Alexis
					Alexis