Metadata-Version: 2.5
Name: getwinbg
Version: 0.1.4
Import-Name: getwinbg
Summary: A Python package and CLI for discovering, retrieving, inspecting, and managing Windows desktop backgrounds, built-in wallpapers, cached Bing images, and lock screen Spotlight collections.
Project-URL: Homepage, https://getwinbg.readthedocs.io
Project-URL: Documentation, https://getwinbg.readthedocs.io
Project-URL: Repository, https://github.com/viratiakiranandhanreddy/getwinbg
Project-URL: Issues, https://github.com/viratiakiranandhanreddy/getwinbg/issues
Project-URL: Changelog, https://getwinbg.readthedocs.io/en/latest/changelog/
Author: Virati Akiranandhan Reddy
License-Expression: MIT
License-File: LICENSE
Keywords: Virati Akiranandhan Reddy,background,bing,desktop,spotlight,viratiakiranandhanreddy,wallpaper,windows
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Desktop Environment
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Python: >=3.13
Requires-Dist: rich>=13.9.4
Requires-Dist: typer>=0.26.7
Provides-Extra: dev
Requires-Dist: ruff>=0.17.3; extra == 'dev'
Requires-Dist: ty>=0.0.95; extra == 'dev'
Description-Content-Type: text/markdown

# getwinbg

Retrieve the current Windows desktop background from Python or the command
line.

`getwinbg` is a lightweight, typed Windows utility that returns the path to
the current desktop background and can optionally reveal or open it, or copy
its path to the clipboard.

[Read the full documentation](https://getwinbg.readthedocs.io/).

## Features

* Retrieve the current Windows desktop background path
* Reveal the background in File Explorer
* Open the background with its default application
* Copy the background path to the Windows clipboard
* Python API and command-line interface
* Fully typed package (`py.typed`)

## Requirements

* Windows
* Python 3.13 or newer

## Installation

Install the latest release from PyPI:

```bash
pip install getwinbg
```

To install the current source checkout:

```bash
git clone https://github.com/ViratiAkiraNandhanReddy/getwinbg.git
cd getwinbg
pip install .
```

## Usage

### CLI

Display the current desktop background:

```bash
getwinbg background
```

Reveal the background file in File Explorer:

```bash
getwinbg background --reveal
```

Open the file with its default image application:

```bash
getwinbg background --open
```

Copy the path as text to the Windows clipboard:

```bash
getwinbg background --copy
```

Use `-r`, `-o`, and `-c` as short forms for `--reveal`, `--open`, and
`--copy`. These options can be combined. Copying places the path on the
clipboard; it does not copy the image file. The global `--version` option
prints the installed package version:

```bash
getwinbg --version
```

Example output from `getwinbg background`:

```text
                     $$\                   $$\           $$\                 
                     $$ |                  \__|          $$ |                
 $$$$$$\   $$$$$$\ $$$$$$\   $$\  $$\  $$\ $$\ $$$$$$$\  $$$$$$$\   $$$$$$\  
$$  __$$\ $$  __$$\\_$$  _|  $$ | $$ | $$ |$$ |$$  __$$\ $$  __$$\ $$  __$$\ 
$$ /  $$ |$$$$$$$$ | $$ |    $$ | $$ | $$ |$$ |$$ |  $$ |$$ |  $$ |$$ /  $$ |
$$ |  $$ |$$   ____| $$ |$$\ $$ | $$ | $$ |$$ |$$ |  $$ |$$ |  $$ |$$ |  $$ |
\$$$$$$$ |\$$$$$$$\  \$$$$  |\$$$$$\$$$$  |$$ |$$ |  $$ |$$$$$$$  |\$$$$$$$ |
 \____$$ | \_______|  \____/  \_____\____/ \__|\__|  \__|\_______/  \____$$ |
$$\   $$ |                                                         $$\   $$ |
\$$$$$$  |                                                         \$$$$$$  |
 \______/                                                           \______/ 

             Retrieve Windows background image paths  •  vX.X.X

╭───────────────────────────────── getwinbg ─────────────────────────────────╮
│ Current desktop background                                                 │
│                                                                            │
│ C:\Users\User\Pictures\wallpaper.jpg                                       │
╰────────────────────────────────────────────────────────────────────────────╯
```

### Python API

The recommended API is the `Background` class:

```python
from getwinbg import Background

background = Background()
print(background.path)

background.reveal()
background.open()
background.copy()
```

Example output:

```text
C:\Users\User\Pictures\wallpaper.jpg
```

`get_background()` remains available for compatibility but is deprecated and
will be removed in version 0.2.0. Use `Background().path` instead:

```python
from getwinbg import get_background

path = get_background()
```

## Development

Install the development dependencies and run the checks:

```bash
pip install -e ".[dev]"
ruff check .
ruff format --check .
ty check
```

Build the documentation locally:

```bash
pip install -r docs/requirements.txt
python -m sphinx -W --keep-going docs docs/_build/html
```

## License

`getwinbg` is released under the [MIT License](LICENSE).
