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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for py_wallpaper-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24765fe7876e5ce7736c8214ba9d883ddd9363542a95ac2ee736a42915878a0b |
|
MD5 | 5b98fd848f2cc806138e5b26284cf7e5 |
|
BLAKE2b-256 | cbad49ba39a271cf9e171ce3de1b9ad2ca071b971161b9ead7853ac64feabd30 |