diff --git a/src/modules/image.cpp b/src/modules/image.cpp index 2388d608..069f723f 100644 --- a/src/modules/image.cpp +++ b/src/modules/image.cpp @@ -44,11 +44,15 @@ auto waybar::modules::Image::update() -> void { { path_ = config_["path"].asString(); } - else + else if(config_['exec'].isString()) { output_ = util::command::exec(config_["exec"].asString()); path_ =output_.out; } + else + { + path_=""; + } if (Glib::file_test(path_, Glib::FILE_TEST_EXISTS)) pixbuf = Gdk::Pixbuf::create_from_file(path_, size_, size_); else