-
Notifications
You must be signed in to change notification settings - Fork 1
feat: major wallpaper system overhaul with cross-platform monitor detection, async thumbnail generation #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Adds a bg-secondary class to the <img> and <video> elements in the wallpaper grid. This provides a solid background color, improving the visual experience for lazy-loaded images by preventing a transparent or empty container from showing while the content is loading.
- Replaced Wayland-specific monitor parsing via `wayland-info` with Electron's `screen.getAllDisplays()` to support cross-platform monitor detection. This removes the need for the `wayland-utils` dependency and makes monitor detection compatible with both Wayland and X11 systems.
…n from settings - Replaced inconsistent query keys like `explore-pexels-images` with namespaced keys such as `wallpapers.explore.pexelsImages` for consistency. - Extended `useSettings` hook and related components to support `additionalQueryKeysToInvalidate`, enabling related data (e.g., API-driven wallpapers) to be revalidated when settings change. - Updated settings config for API keys and folder sources to invalidate relevant queries on change, ensuring the UI stays in sync with updated settings.
…mprove wallpaper handling - Add sharp dependency and include ffmpeg in Arch and Nix packaging - Implement thumbnail caching and generation for images and videos using Sharp and FFmpeg - Update wallpaper data models to separate thumbnailPath and fullSizePath - Modify API wallpaper transformations to align with new data structure - Adjust image/video wallpaper rendering to use cached thumbnails - Refactor wallpaper grid and dialog components for improved thumbnail usage and UI consistency - Add execute helper option to ignore errors for smoother FFmpeg thumbnail extraction - Update Forge config and Vite external to include sharp
- Add `decrypt: true` option when fetching API key from settings
… monitor - Replace `internal.lastWallpaperCmd` with `internal.lastWallpaper` as a `Record<string, SetWallpaperSchema>` to persist complete wallpaper state per monitor instead of only storing the executed command. - Added `screenshot` flag to `SetWallpaperSchema` to control whether preview images are generated and copied. - Updated `set` procedure to save wallpapers for all monitors on apply. - Modified restore logic to reapply stored wallpapers directly via `wallpaper.set` rather than executing saved commands. - Removed old command/args persistence in wallpaper setters.
- Updated `set` procedure to automatically populate `input.monitors` with all detected monitors if no monitors are provided in the request. - Ensures wallpapers are always applied to at least one monitor.
- Extract type definitions to dedicated types.ts file - Move search functionality to search.ts module - Separate wallpaper setting logic into set.ts - Create thumbnail handling module (thumbnail.ts) - Update all import paths to reference new modular structure - Maintain existing API surface while improving code organization This improves maintainability by separating concerns and making the codebase easier to navigate and modify.
- Move thumbnail generation from main thread to dedicated worker - Convert thumbnail.ts to worker thread with parentPort messaging - Update wallpaper search to use worker for non-blocking thumbnail processing - Add thumbnail-generator entry to vite build configuration - Improve UI responsiveness by preventing main thread blocking during thumbnail creation This ensures the main application remains responsive while processing large numbers of wallpaper thumbnails in the background.
Updated trpc wallpaper.search to explicitly cast the worker result as Promise<WallpaperData<LibraryWallpaper>> for improved type safety. Also imported WallpaperData from types.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix: Add background color to wallpaper grid items
refactor: remove wayland-info dependency in favor of Electron API
wayland-infowithElectron's
screen.getAllDisplays()to support cross-platform monitordetection. This removes the need for the
wayland-utilsdependency andmakes monitor detection compatible with both Wayland and X11 systems.
refactor(query): standardize query keys and support cache invalidation from settings
explore-pexels-imageswithnamespaced keys such as
wallpapers.explore.pexelsImagesforconsistency.
useSettingshook and related components to supportadditionalQueryKeysToInvalidate, enabling related data (e.g.,API-driven wallpapers) to be revalidated when settings change.
relevant queries on change, ensuring the UI stays in sync with updated
settings.
refactor: add Sharp and FFmpeg support for thumbnail generation and improve wallpaper handling
Sharp and FFmpeg
fullSizePath
usage and UI consistency
thumbnail extraction
fix: wallpaper engine API key retrieval
decrypt: trueoption when fetching API key from settingsrefactor(settings/wallpaper): store last wallpaper as full schema per monitor
internal.lastWallpaperCmdwithinternal.lastWallpaperas aRecord<string, SetWallpaperSchema>to persist complete wallpaperstate
per monitor instead of only storing the executed command.
screenshotflag toSetWallpaperSchemato control whetherpreview images are generated and copied.
setprocedure to save wallpapers for all monitors on apply.wallpaper.setrather than executing saved commands.fix(wallpaper): default to all monitors when none specified
setprocedure to automatically populateinput.monitorswith all detected monitors if no monitors are provided in the request.
refactor(wallpaper): split monolithic module into focused components
This improves maintainability by separating concerns and making the
codebase easier to navigate and modify.
refactor: offload thumbnail generation to worker thread
processing
thumbnail creation
This ensures the main application remains responsive while processing
large numbers of wallpaper thumbnails in the background.
fix: restoring wallpaper blocking ui