mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Battery event (#18)
This commit is contained in:
@ -4,10 +4,8 @@
|
||||
waybar::modules::Custom::Custom(std::string name, Json::Value config)
|
||||
: _name(name), _config(config)
|
||||
{
|
||||
if (!_config["exec"]) {
|
||||
std::cerr << name + " has no exec path." << std::endl;
|
||||
return;
|
||||
}
|
||||
if (!_config["exec"])
|
||||
throw std::runtime_error(name + " has no exec path.");
|
||||
int interval = _config["interval"] ? _config["inveral"].asInt() : 30;
|
||||
_thread = [this, interval] {
|
||||
Glib::signal_idle().connect_once(sigc::mem_fun(*this, &Custom::update));
|
||||
|
Reference in New Issue
Block a user