kolbyjack/MMM-Wallpaper

Add brief caption indicating filename for local images

Closed this issue · 3 comments

I would like to see the filename for the image displayed, when local source is used.

I was able to add it by adding a line to images.push in node_helper.js, so it looks like:

images.push({
  url: `${urlPath}${dirent}`,
  caption: `File: "${dirent}"`,
});

I can do a pull request if desired.

Went ahead and committed with just caption: dirent, is that satisfactory?

Yes, that's excellent, thank you. I do tend to do more than is necessary!

@kolbyjack @apiontek

Hi there, would it be possible to have the caption only be the filename?

And not as is, the full path.

i.e. Display for example "mypicture" instead of "/home/user/media/mypicture.png"