Introduces a new ImagePicker helper that consolidates duplicate wallpaper
selection logic from Hyprpaper.cpp and ConfigManager.cpp into a single
reusable function.
- Add new ImagePicker.{hpp,cpp} with getRandomImageFromDirectory() helper
- Function handles directory scanning, file extension validation, and random selection
- Supports excluding current wallpaper to avoid duplicate selections
- Updates both wallpaper loading code paths to use the new helper
- Uses std::shuffle instead of random index for better randomization
This change improves code maintainability by removing duplicate logic and
centralizing image selection behavior in a single location.
- Replace <random> with helpers/RandomGenerator.hpp for consistent random number generation
- Improve buffer target handling by using path directly instead of dereferencing wallpaper target
- Simplify lambda capture in ensurePoolBuffersPresent() by using reference capture
- Add support for selecting random wallpapers from directories
- Add defer_preload option to reduce memory usage
- Update README with new features
- Improve path handling with tilde expansion
This would fix a cross-compile issue where hyprwayland-scanner is pulled
in for target but needs to run on host.
Signed-off-by: Markus Volk <f_l_k@t-online.de>
There was misbehaviour from config. Say, we have next config:
```
...
wallpaper = , /path/to/generic.jpg
wallpaper = DP-1, /path/to/port.jpg
wallpaper = desc:My Monitor, /path/to/desc.jpg
```
Here the `DP-1` and `desc:My Monitor` are different monitors.
_EXPECTED_: The `desc:My Monitor` renders `/path/to/desc.jpg` wallpaper
_ACTUAL_: The `desc:My Monitor` renders `/path/to/generic.jpg` wallpaper
Change-Id: I02c9495524bd620d5a58b9d934b07aded051f6c2
* Add handler "reload" to do a change of wallpaper by one hyprctl execution
* fixed contain parameter handling in "handleReload"
* added bitmap (.bmp) image support
* refactored
* reserve -> resize