splashpaper
Turn Unsplash into a desktop wallpaper.
Works on Windows, most Linux DEs/WMs, macOS and Android (check compatibility)
Installation
To use this script, you need Python 3.6+ and pip installed.
Then, just run:
python -m pip install splashpaper
Getting help
It's as simple as:
python -m splashpaper --help
That would print help (mostly the same information as below, but shorter)
Usage
Basic
Basic usage is simple:
python -m splashpaper
But that would set a random picture! Not really cool...
Resolution
First of all, the script currently doesn't know your screen resolution.
Provide it with -r/--resolution option to fetch smaller picture, e.g:
python -m splashpaper --resolution 1920x1080
Sources
Then you'd probably want some specific images.
Splashdesktop got your back here!
You can provide four types of sources (and combine them), each with as many sources as you want:
Search terms
With -s/--search option:
python -m splashpaper --search sea ocean water
Collections
With -c/--collections option (that's my dark wallpapers collection, by the way):
python -m splashpaper --collections 22546183
Presets
If you don't really know where to look:
python -m splashpaper --presets dark
Available options: dark, light, all-wallpapers, abstract, nature, night, city
User photos
With -u/--users option:
python -m splashpaper --users erondu aditya1702
User likes
With -l/--likes option:
python -m splashpaper --likes qevitta erondu
Modifiers
There are three modifiers:
--featured: Use photos picked by Unsplash editors.--daily: Use photo of the day.--weekly: Use photo of the week (overrides--daily).
These can be used with any combination of sources.
Slideshow
If you want to change wallpaper once in a while, you can set interval in seconds with -i/--interval:
python -m splashpaper --interval 600
Autostart
If this wasn't obvious, you need to add this script to autostart if you want it to work continiously.
Examples
Photos from my collection of wallpapers, changing every minute
python -m splashpaper --resolution 1920x1080 --collections 9943257 --interval 60
Photo of the day from my collection of wallpapers
python -m splashpaper --resolution 1920x1080 --collections 9943257 --daily
Water photos, changing every 10 minutes
python -m splashpaper --resolution 1920x1080 --search water ocean sea --interval 600
Featured photo of the day
python -m splashpaper --resolution 1920x1080 --featured --daily
Using as a module
You can use script as a module, using dictionary of options as args:
from splashpaper import main_action
from time import sleep
args = {
"collections": ["9943257"],
"resolution": "1920x1080",
}
while True:
main_action(args)
sleep(60)
Functions
Script uses a very modular workflow.
By default, script calls main_loop(args), which in turn calls main_action(args) once or with interval.
main_action(args) is defined as:
def main_action(args):
return set_wallpaper(
download_file(
build_url(args),
abspath(dirname(__file__)) + "/wallpaper.jpg"
)
)
This snippet shows that:
- To build a URL based on your args, script uses
build_url(args) - To download a picture from that URL, script uses
download(url, path), which returns path - To set picture as a wallpaper, script uses
set_wallpaper(path)
Compatibility
Splashpaper runs on:
- Windows
- macOS (Warning: when changing wallpaper, Dock restarts and screen may freeze for half a second.)
- Linux
- XFCE
- LXDE/LXQt
- Gnome
- Unity
- Cinnamon
- Mate
- i3
- bspwm
- awesome
- sway
- ... and also any other de/wm where feh can change wallpaper (used as a fallback)
- Android
Usage on Android
To use module on Android:
- Install Termux.
- In Termux, install Python (
pkg install python) and Termux:API (pkg install termux-api) if it's not already installed. - Install module in Termux just as on desktop: (
python -m pip install splashpaper) - Use it!
Metadata
Release files for splashpaper 1.3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| splashpaper-1.3.4.tar.gz | 7.3 kB | Without provenance | Details for splashpaper-1.3.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| splashpaper-1.3.4-py3-none-any.whl | Python 3 | none | any | Details for splashpaper-1.3.4-py3-none-any.whl |
Total release size: 14.4 kB
Release files / splashpaper-1.3.4.tar.gz
| Download URL | splashpaper-1.3.4.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c2a0a3aaa551e13904968ac7ac8e159b7bf34bb6f3158161385c3e730a3553f
|
|
BLAKE2b-256 checksum How to use checksums |
66cd6c04f3a9c7e1f8790da2fd67532aa6b2eb03a603d177cef5bcef2c0cc352
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.8 Linux/6.0.2-arch1-1
|
Release files / splashpaper-1.3.4-py3-none-any.whl
| Download URL | splashpaper-1.3.4-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f22c92566dea3ee7f1e9d77271a6635c10ef21f7b0a87dcbd028c8d8cb021286
|
|
BLAKE2b-256 checksum How to use checksums |
e7424ab487cec94eb044c449231334974d03c12d1c052562d28c07ae82eff82e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.8 Linux/6.0.2-arch1-1
|
Security for splashpaper 1.3.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.