swaywm / swaybg

Wallpaper tool for Wayland compositors
MIT License
490 stars 31 forks source link

Select random image form a directory #48

Closed zunfix1 closed 1 year ago

zunfix1 commented 1 year ago

Add a -d flag to allow randomly selecting a image from the provided directory.

Possible improvement: Currently, this patch does leak the memory of the directory path. To fix this would need to make swaybg_output_config::image_path to a char* instead of a const char* and conditionally call free() after main.c:622.

Feedback is greatly appreciated.

emersion commented 1 year ago

Sorry, but we are not interested in maintaining this feature for swaybg. You're more than welcome to fork swaybg of course.