[][src]Crate wallpaper

This library gets and sets the desktop wallpaper/background.

The supported desktops are:

  • Windows
  • macOS
  • GNOME
  • KDE
  • Cinnamon
  • Unity
  • Budgie
  • XFCE
  • LXDE
  • MATE
  • Deepin
  • i3 (set only)

Examples

extern crate wallpaper;

fn main() {
    println!("{:?}", wallpaper::get());
    wallpaper::set_from_url("https://source.unsplash.com/random").unwrap();
    println!("{:?}", wallpaper::get());
}

Functions

get

Returns the wallpaper of the current desktop.

set_from_path

Sets the wallpaper for the current desktop from a file path.

set_from_url

Sets the wallpaper for the current desktop from a URL.