wallpaper 3.1.1

Gets and sets the desktop wallpaper/background.
Documentation

wallpaper crate docs

This Rust library gets and sets the desktop wallpaper/background.

The supported desktops are:

  • Windows
  • macOS
  • GNOME
  • KDE
  • Cinnamon
  • Unity
  • Budgie
  • XFCE
  • LXDE
  • MATE
  • Deepin
  • Most Wayland compositors (set only, requires swaybg)
  • i3 (set only, requires feh)

Example

extern crate wallpaper;

fn main() {
    println!("{:?}", wallpaper::get().unwrap());
    wallpaper::set_from_path("/usr/share/backgrounds/gnome/adwaita-day.png").unwrap();
    wallpaper::set_mode(wallpaper::Mode::Crop).unwrap();
    println!("{:?}", wallpaper::get().unwrap());
}