Skip to content

Dev - #645

Open
thep0y wants to merge 8 commits into
mainfrom
dev
Open

Dev#645
thep0y wants to merge 8 commits into
mainfrom
dev

Conversation

@thep0y

@thep0y thep0y commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

close: #627

thep0y added 8 commits August 1, 2026 22:40
Add PartialEq, Eq, PartialOrd, Ord, Copy traits to Date struct
for date comparison operations needed by random theme selector.

Add Date::new() constructor and accessor methods (year, month, day).
Add DailyRandomThemeSelector that picks a random theme each day
using Fisher-Yates shuffle with xorshift64 RNG (seeded by getrandom).

Features:
- No theme repeats until all themes have been used
- Auto-reshuffle after all themes are consumed
- filter_themes_by_pool() for user-specified theme pool filtering
- Pool can be None (all themes) or Some([...]) (specific themes)
- Returns references to avoid unnecessary cloning
Add WallpaperMode enum with struct variants:
- Fixed { monitor_specific_wallpapers }: existing solar-based mode
- Random { pool }: new daily random mode with optional theme pool

Add backward compatibility: old configs without wallpaper_mode
automatically migrate to Fixed mode.

Update monitor_specific_wallpapers() to return Option since
Random mode doesn't have per-monitor configuration.
Add random mode handling to DaemonApplication:
- Initialize RandomModeState for Random wallpaper mode
- Switch theme on new day or first run
- Scan themes directory for available themes
- Apply selected theme to all monitors (Fixed mode internally)

Update ThemeEngine and MonitorProcessor to handle
monitor_specific_wallpapers() returning Option.

Add getrandom dependency for entropy-based seed generation.
Update theme service functions to handle monitor_specific_wallpapers()
now returning Option<&MonitorSpecificWallpapers> instead of &MonitorSpecificWallpapers.
Update getrandom dependency from 0.2 to 0.4, replacing deprecated
getrandom::getrandom() with getrandom::fill().

Also update windows crate version and mockall version constraint.
@thep0y thep0y added feature New feature rust Pull requests that update rust code typescript labels Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature rust Pull requests that update rust code typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

新功能建议:多壁纸主题循环,例如: 一周每天显示不同壁纸

1 participant