From 012baadaca2a6dea6d4e9f2b23ff99920735a4d5 Mon Sep 17 00:00:00 2001 From: Anuragh K P Date: Sun, 29 Jan 2023 10:41:24 +0530 Subject: [PATCH] added exec condition check on image module --- src/modules/image.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/image.cpp b/src/modules/image.cpp index 2388d60..069f723 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