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.
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 achar*
instead of aconst char*
and conditionally callfree()
aftermain.c:622
.Feedback is greatly appreciated.