feh icon indicating copy to clipboard operation
feh copied to clipboard

.fehbg doesn't refresh itself on image change

Open muke101 opened this issue 5 years ago • 3 comments
trafficstars

The file to keep track of the current file being displayed as the desktop background, .fehbg, isn't removing old entries when it adds new ones. I have a cronjob setting feh to display a new image every 30 seconds, and I've now discovered I have a .fehbg of half a gig worth of file path names. I'm not sure of the original intent for the file, but for my purposes it would be great if it only showed the image/images (in the case of multiple monitors) currently displayed to the desktop, and then overwrote the last entry when this was changed, as it would be nice to have the specific file name out of a folder with many different images that feh is drawing from. Despite the intentions though, it seems like an oversight to just have the file accumulate file paths indefinitely, making users like myself have to periodically reset it to save space.

muke101 avatar Oct 07 '20 13:10 muke101

That's not intended behaviour and I cannot reproduce it here. Could you provide the contents of your cronjob? Perhaps there's an edge case with filelist and multi-monitor handling I'm missing.

derf avatar Oct 25 '20 09:10 derf

* * * * * export DISPLAY=:0 && feh --bg-fill --randomize /path/to/pictures
* * * * * export DISPLAY=:0 && sleep 30 && feh --bg-fill --randomize /path/to/pictures

muke101 avatar Oct 27 '20 22:10 muke101

The files are added here but I don't see how anything there would result in the file size growing indefinitely, unless somehow the file path was being appended within the .fehbg file which then gets re-parsed, but even then it shouldn't be able to grow indefinitely. Would it be possible to show how the .fehbg files increase in size? (e.g., have a difference between two invokations ideally them being one after the other)

A workaround if you don't really need a .fehbg is to add --no-fehbg to both of your commands.

avlec avatar Feb 24 '21 02:02 avlec