Skip to main content

Python wallpaper for Humans.

Project description

wallpaper

Get or set the desktop wallpaper

Works on macOS 10.12+ and Windows 10+, inspired by wallpaper node

Install

only python3 is supported

pip install py-wallpaper

Usage

from wallpaper import get_wallpaper, set_wallpaper

# get current wallpaper's path
print(get_wallpaper())
# /Users/leetao/Workspace/py/wallpaper/tests/bg.jpg # your wallpaper path

# set your photo
set_wallpaper("your photo's path")

API

.get_wallpaper(options?)

Returns the path of the current desktop wallpaper.

options

Type: object

screen (macOS only)

Type: string | number
Values: 'all', 'main', or the index of a screen from .screens()
Default: 'main'

The screen to get the wallpaper from.

If you set 'all' then .get_wallpaper will return a list.

.set_wallpaper(imagePath, options?)

Returns a object.

imagePath

Type: string

The path to the image to set as the desktop wallpaper.

options

Type: object

screen (macOS only)

Type: string | number
Values: 'all', 'main', or the index of a screen from .screens() Default: 'all'

The screen to set the wallpaper on.

scale (macOS only)

Type: string
Values: 'auto' | 'fill' | 'fit' | 'stretch' | 'center'
Default: 'auto'

Scaling method.

TODO

wallpaper on Linux

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py-wallpaper-0.0.1.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

py_wallpaper-0.0.1-py3-none-any.whl (3.7 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page