A Python clone of the classic Unix xv image viewer
Project description
pxv
A simple image viewer and manipulator built with Python/Pillow/Tkinter that takes inspiration from the classic Unix xv image viewer.
Quickstart
Run directly from the GitHub repo (requires uv):
uvx --from git+https://github.com/linsomniac/pxv pxv photo.jpg
Or install locally:
uv pip install git+https://github.com/linsomniac/pxv
pxv photo.jpg
Pass files, directories, or nothing (opens a file dialog):
pxv image.png # single file
pxv *.jpg # multiple files
pxv ~/Photos/ # all images in a directory
pxv # open file dialog
Keyboard Shortcuts
| Key | Action |
|---|---|
> |
Zoom in |
< |
Zoom out |
n |
Zoom to 1:1 (normal) |
Space / Right |
Next image |
Backspace / Left |
Previous image |
c |
Crop to selection |
e |
Enhancement dialog |
Ctrl+s |
Save as |
Escape |
Clear selection |
q |
Quit |
Right-click for additional options: rotate, flip, resize, grab (screenshot), print, and more.
Enhancements
The enhancement dialog (e) provides real-time adjustment of:
- Brightness, contrast, gamma
- Sharpen, blur
- Saturation, hue rotation
- Per-channel RGB color balance
Features
- XV-style window sizing: window grows/shrinks to fit the displayed image, capped at the current monitor's bounds
- Multi-monitor aware: detects per-monitor geometry via xrandr so windows don't span displays
- EXIF-aware orientation
- Rubber-band selection for cropping
- Wrap-around file navigation
- Supports PNG, JPEG, BMP, TIFF, GIF, WebP, PPM, PGM, PBM, ICO
Requirements
- Python 3.10+
- Tkinter (usually included with Python; on Debian/Ubuntu:
sudo apt install python3-tk) - Pillow 12+
Development
git clone https://github.com/linsomniac/pxv
cd pxv
uv sync
uv run pxv test_images/
Lint and type-check:
uv run ruff check src/
uv run ruff format --check src/
uv run mypy src/pxv/
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pxv-1.0.0.tar.gz.
File metadata
- Download URL: pxv-1.0.0.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5840cc51723b0b01372dd14d6a8db0739f131c87fbf81494fb3446309fd6b38f
|
|
| MD5 |
0220681f61dde90df507540f4dc138dd
|
|
| BLAKE2b-256 |
29ef81e933068cf1055ad7605cc717628f80f5afef16978cc9db4864ad82a531
|
Provenance
The following attestation bundles were made for pxv-1.0.0.tar.gz:
Publisher:
release.yml on linsomniac/pxv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pxv-1.0.0.tar.gz -
Subject digest:
5840cc51723b0b01372dd14d6a8db0739f131c87fbf81494fb3446309fd6b38f - Sigstore transparency entry: 1281672591
- Sigstore integration time:
-
Permalink:
linsomniac/pxv@213864528f1f2872317b7e9cbbbca792921ff2be -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/linsomniac
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@213864528f1f2872317b7e9cbbbca792921ff2be -
Trigger Event:
release
-
Statement type:
File details
Details for the file pxv-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pxv-1.0.0-py3-none-any.whl
- Upload date:
- Size: 26.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
664cb8766f8959eaa76eef9ec8b02f54f091900076dcb0750bea896038f3a5b6
|
|
| MD5 |
e1410ffdafc0030117ee57aecf67678e
|
|
| BLAKE2b-256 |
86568ae8facc5c7af6535f2802f94bc0b335a346501bd99ea3d8f7a0dc042db5
|
Provenance
The following attestation bundles were made for pxv-1.0.0-py3-none-any.whl:
Publisher:
release.yml on linsomniac/pxv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pxv-1.0.0-py3-none-any.whl -
Subject digest:
664cb8766f8959eaa76eef9ec8b02f54f091900076dcb0750bea896038f3a5b6 - Sigstore transparency entry: 1281672733
- Sigstore integration time:
-
Permalink:
linsomniac/pxv@213864528f1f2872317b7e9cbbbca792921ff2be -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/linsomniac
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@213864528f1f2872317b7e9cbbbca792921ff2be -
Trigger Event:
release
-
Statement type: