Skip to content

Conversation

@Kasper24
Copy link
Owner

@Kasper24 Kasper24 commented Aug 8, 2025

  • fix: Add background color to wallpaper grid items

    • Adds a bg-secondary class to the and
  • refactor: remove wayland-info dependency in favor of Electron API

    • 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.
  • refactor(query): standardize query keys and support cache invalidation 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.
  • refactor: add Sharp and FFmpeg support for thumbnail generation and improve 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
  • fix: wallpaper engine API key retrieval

    • Add decrypt: true option when fetching API key from settings
  • refactor(settings/wallpaper): store last wallpaper as full schema per 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.
  • fix(wallpaper): default to all monitors when none specified

    • 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.
  • refactor(wallpaper): split monolithic module into focused components

    • 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.

  • refactor: offload thumbnail generation to worker thread

    • 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.

  • fix: restoring wallpaper blocking ui

Kasper24 added 10 commits August 6, 2025 16:04
- 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.
@Kasper24 Kasper24 changed the title dev feat: major wallpaper system overhaul with cross-platform monitor detection, async thumbnail generation Aug 8, 2025
Updated trpc wallpaper.search to explicitly cast the worker result as
Promise<WallpaperData<LibraryWallpaper>> for improved type safety.
Also imported WallpaperData from types.
@Kasper24 Kasper24 merged commit 0aa2a33 into main Aug 8, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants