bettersystray
Windows only. Thread-safe system tray icons for Windows 10 and later.
- Every method is safe to call from any thread
- Animated icons
- Right-click menus that are rebuilt on every click, with check marks, disabled items and submenus
- Callbacks run on a worker thread, so slow callbacks never freeze the icon
- Sharp icons on high DPI screens, and the icon comes back if Explorer restarts
Install
pip install bettersystray
Usage
from PIL import Image
from bettersystray import BetterSysTray, MenuItem, MenuSeparator
tray = BetterSysTray(
Image.open("icon.png"),
"My app",
lambda: [
MenuItem(label="Hello", callback=lambda: print("Hello")),
MenuSeparator(),
MenuItem(label="Quit", callback=tray.stop),
],
click_handler=lambda: print("Clicked"),
)
tray.start()
start() returns right away. The process stays alive until stop() is called.
Other methods:
tray.update_title("New tooltip")tray.update_icon(image)for a static icontray.update_icon([frame1, frame2, frame3], interval=0.1)for an animation
Demo
examples/example.py is an interactive console demo of every feature:
python examples/example.py
License
MIT
Metadata
Release files for bettersystray 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bettersystray-0.1.0-py3-none-win32.win_amd64.win_arm64.whl | Python 3 | none | Windows x86-32, Windows ARM64, Windows x86-64 | Details for bettersystray-0.1.0-py3-none-win32.win_amd64.win_arm64.whl |
Release files / bettersystray-0.1.0-py3-none-win32.win_amd64.win_arm64.whl
| Download URL | bettersystray-0.1.0-py3-none-win32.win_amd64.win_arm64.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 Windows ARM64 Windows x86-32 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
fb9f2d60ae27ac5624a971cceaa45cce1dbfa6348e313c5e2996c65068d8d2a5
|
|
BLAKE2b-256 checksum How to use checksums |
802315089a0cb1c518ae01a4b55a9f60bd252c1ae53b2a72171272de4ec3dece
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for bettersystray 0.1.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.