kolbyjack / MMM-Wallpaper

MagicMirror module to display wallpapers from various online sources
https://magicmirror.builders/
MIT License
99 stars 31 forks source link

Add brief caption indicating filename for local images #82

Closed apiontek closed 1 year ago

apiontek commented 1 year ago

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.

kolbyjack commented 1 year ago

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

apiontek commented 1 year ago

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

RomainLG commented 7 months ago

@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"