added exec condition check on image module
This commit is contained in:
parent
9068b7548f
commit
012baadaca
|
@ -44,11 +44,15 @@ auto waybar::modules::Image::update() -> void {
|
||||||
{
|
{
|
||||||
path_ = config_["path"].asString();
|
path_ = config_["path"].asString();
|
||||||
}
|
}
|
||||||
else
|
else if(config_['exec'].isString())
|
||||||
{
|
{
|
||||||
output_ = util::command::exec(config_["exec"].asString());
|
output_ = util::command::exec(config_["exec"].asString());
|
||||||
path_ =output_.out;
|
path_ =output_.out;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
path_="";
|
||||||
|
}
|
||||||
if (Glib::file_test(path_, Glib::FILE_TEST_EXISTS))
|
if (Glib::file_test(path_, Glib::FILE_TEST_EXISTS))
|
||||||
pixbuf = Gdk::Pixbuf::create_from_file(path_, size_, size_);
|
pixbuf = Gdk::Pixbuf::create_from_file(path_, size_, size_);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue