mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
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
Block a user