Skip to main content

🖼️ Py Bg Changer

PyPI Python Versions GitHub repo size Tests GitHub License Code Style: Black uv

Simple cross-platform wallpaper changer made with Python. Change your desktop wallpaper from the terminal, Win+R or any launcher. Works on Windows, macOS and Linux, with no dependencies.

The command is py-bg-changer, and pbc is the short alias for it.

📥 Installation

you can install the latest version from PyPI with uv (recommended):

uv tool install py-bg-changer

or try it without installing:

uvx --from py-bg-changer pbc --help

prefer pip? pipx install py-bg-changer or pip install py-bg-changer work too. Needs Python 3.10+.

📖 Usage

pbc add night ~/Pictures/night.jpg   # save an image under a name
pbc add night img.jpg -a n -a dark   # ...and give it extra names (aliases)
pbc add night img.jpg --default      # ...or make it the default right away
pbc alias night moon                 # add more aliases later
pbc rename night midnight            # rename a wallpaper or an alias
pbc night                            # set it by name (or any alias: pbc n)
pbc ~/Pictures/any.png               # or set any image directly
pbc list                             # see what you saved (* marks the default); `pbc ls` works too
pbc default night                    # choose what a plain "pbc" sets
pbc remove night                     # forget a name (or just an alias)
pbc                                  # set the default wallpaper

If a saved name clashes with a command (say, one called list, ls or default), use pbc set list.

🛠 Getting Started

follow the instruction to install Py Bg Changer from source (to try the latest code or to work on it):

  1. Clone Code

    use Git on your system

    git clone https://github.com/Mr-MRF-Dev/Py-Bg-Changer.git
    

    or use GitHub CLI

    gh repo clone Mr-MRF-Dev/Py-Bg-Changer
    
  2. Change your directory.

    cd Py-Bg-Changer
    
  3. Install it with uv

    uv tool install --editable .
    

    --editable means any change you make to the code is used right away. Leave it out for a normal install, or use pip install . if you prefer pip.

  4. Check that it works

    pbc --version
    

Done :)

to remove it later: uv tool uninstall py-bg-changer (your saved wallpapers and config stay where they are).

💡 Tips

  • Running pbc from Win+R opens a terminal that closes right away. Use pbcw (or py-bg-changer-w) instead: it takes the same arguments, opens no window, and shows a small message box only if something goes wrong.

    pbcw night
    

    it prints nothing on success, so use pbc in a terminal for list, default and the like.

  • A wallpaper can have as many aliases as you like, and every alias works anywhere a name does (pbc n, pbc default n, pbc alias n moon). Removing an alias leaves the wallpaper alone; removing a wallpaper also removes its aliases. Renaming a wallpaper keeps its aliases, its image and its place as the default.

  • When you save an image, py-bg-changer keeps its own copy next to the config file and gives that copy to the system. If you later move or delete the original, the wallpaper still works. The copy is removed when you remove the name (or replace its image), and your original file is never touched.

  • Saved names live in a small JSON file, and the copied images in a wallpapers folder next to it. Run pbc path to see where, or set PBC_CONFIG to use a different file.

    {
      "wallpapers": {
        "night": "/home/me/.config/py-bg-changer/wallpapers/3e23e8160039594a.png"
      },
      "aliases": { "n": "night", "dark": "night" },
      "default": "night"
    }
    

🖥️ Supported Desktops

OS Notes
Windows Built in, nothing extra needed
macOS Built in (uses osascript)
Linux GNOME, Budgie, Cinnamon, MATE, KDE Plasma, XFCE and Sway work out of the box. Anything else (i3, bspwm, ...) falls back to feh or nitrogen if installed.

👨‍💻 Development

the project is managed with uv:

uv sync              # create the virtualenv and install everything
uv run pytest        # run the tests
uv run pbc --help    # run the CLI from source

🤝 Contributing

we welcome any contributions you may have. If you're interested in helping out, fork the repository and create an Issue and PR.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for py-bg-changer 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-bg-changer 1.0.0
File Size Uploaded Provenance
py_bg_changer-1.0.0.tar.gz 11.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for py-bg-changer 1.0.0
File Interpreter ABI Platform
py_bg_changer-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.4 kB

Release files / py_bg_changer-1.0.0.tar.gz

Download URL py_bg_changer-1.0.0.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
db04802891cac04683e6da7c7c5661c7c359e5d5fab451f4b912e2dc322eec36
BLAKE2b-256 checksum
How to use checksums
cebd9931d91085bd0a4245d839037eb3c92a0a3e8f72346d52996d08bf65b998
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / py_bg_changer-1.0.0-py3-none-any.whl

Download URL py_bg_changer-1.0.0-py3-none-any.whl
Size 13.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f26f567224fe9dea6bd52ce05e8e4686029cfe92995ae09970826864512cb8e5
BLAKE2b-256 checksum
How to use checksums
9964c848c60a806142db2bd48e7559218f3b9a80056c2eeb3cf0b18e55c6ead0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for py-bg-changer 1.0.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page