Skip to content

A cross-platform Golang library for getting and setting desktop wallpapers

License

Notifications You must be signed in to change notification settings

edwindvinas/wallpaper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wallpaper Documentation

A cross-platform (Linux, Windows, and macOS) Golang library for getting and setting the desktop background.

Installation

go get github.com/reujab/wallpaper

Example

package main

import (
	"fmt"

	"github.com/reujab/wallpaper"
)

func main() {
	background, err := wallpaper.Get()

	if err != nil {
		panic(err)
	}

	fmt.Println("Current wallpaper:", background)
	wallpaper.SetFromFile("/usr/share/backgrounds/gnome/adwaita-day.jpg")
	wallpaper.SetFromURL("https://i.imgur.com/pIwrYeM.jpg")
}

Notes

  • On Windows and KDE, you must log out and in again for the background to update.
  • Enlightenment is not supported.

About

A cross-platform Golang library for getting and setting desktop wallpapers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%