wayle-wallpaper 0.1.0

Wallpaper management with cycling and color extraction
Documentation

Wallpaper management via awww with cycling and theming support.

Quick Start

use wayle_wallpaper::WallpaperService;
use std::path::PathBuf;

# async fn example() -> Result<(), wayle_wallpaper::Error> {
let wp = WallpaperService::new().await?;

// Set wallpaper on all monitors
wp.set_wallpaper(PathBuf::from("/path/to/image.jpg"), None).await?;

// Check current state
for (monitor, state) in wp.monitors.get().iter() {
    println!("{}: {:?} (fit: {})", monitor, state.wallpaper, state.fit_mode);
}
# Ok(())
# }

Directory Cycling

# use wayle_wallpaper::{WallpaperService, CyclingMode};
# use std::path::PathBuf;
# use std::time::Duration;
# async fn example() -> Result<(), wayle_wallpaper::Error> {
# let wp = WallpaperService::new().await?;
// Cycle through a directory
wp.start_cycling(
    PathBuf::from("/path/to/wallpapers"),
    Duration::from_secs(300),
    CyclingMode::Sequential,
)?;

// Manual navigation
wp.advance_cycle().await?;
wp.rewind_cycle().await?;

wp.stop_cycling();
# Ok(())
# }

Configuration

Method Effect
transition(TransitionConfig) Animation when changing wallpapers
color_extractor(ColorExtractorConfig) Tool and parameters for extracting dominant colors
theming_monitor(Option<String>) Which monitor drives color extraction
shared_cycle(bool) Sync cycling across monitors in shuffle mode
engine_active(bool) Toggle awww rendering (state tracking continues)
use wayle_wallpaper::{WallpaperService, TransitionConfig, TransitionType};

# async fn example() -> Result<(), wayle_wallpaper::Error> {
let wp = WallpaperService::builder()
    .transition(TransitionConfig {
        transition_type: TransitionType::Left,
        ..Default::default()
    })
    .build()
    .await?;
# Ok(())
# }

Reactive Properties

All fields are Property<T>:

  • .get() - Current value snapshot
  • .watch() - Stream yielding on changes

Service Fields

Field Type Description
cycling Option<CyclingConfig> Active cycling state
monitors HashMap<String, MonitorState> Per-monitor wallpaper and fit mode
transition [TransitionConfig] Animation settings

Control Methods

  • set_wallpaper() - Apply wallpaper to one or all monitors
  • start_cycling() / stop_cycling() - Directory cycling
  • advance_cycle() / rewind_cycle() - Manual navigation
  • set_fit_mode() - Change scaling mode per monitor or globally
  • set_transition() - Configure animations

D-Bus Interface

When with_daemon() is enabled, the service registers on the session bus.

  • Service: com.wayle.Wallpaper1
  • Path: /com/wayle/Wallpaper
  • Interface: com.wayle.Wallpaper1

See dbus.md for the full interface specification.