LumiTray
LumiTray is a background Windows/Linux application that approximates ambient light with one low-resolution webcam frame and adjusts the built-in laptop display. It samples every 30 seconds on AC power and every 5 minutes on battery or unknown power.
Privacy and accuracy
- Frames are processed in memory and are never saved.
- There is no recording, face detection, telemetry, or cloud service.
- The webcam is closed between measurements; its indicator may turn on briefly.
- A webcam is not a true ambient-light sensor. Use quick calibration and brightness bias to adapt the approximation to your laptop and room.
- Manual brightness changes pause automatic adjustment for 15 minutes.
Install with pipx
Requires Python 3.11 or newer:
pipx install lumitray
lumitray install --autostart
lumitray install creates a per-user Start Menu shortcut on Windows or application entry on Linux. --autostart also starts LumiTray at login. No administrator privileges are required.
To remove launchers while preserving settings:
lumitray uninstall
pipx uninstall lumitray
Standalone Windows and Linux packages
Download lumitray-windows.zip or lumitray-linux.tar.gz from the GitHub release and extract both executables. No system Python is required.
On Windows:
.\lumitray.exe install --autostart
.\lumitray-tray.exe
On Linux:
./lumitray install --autostart
./lumitray-tray
Linux requires a V4L2-compatible webcam, a supported tray/AppIndicator environment, and brightnessctl with user-writable backlight permissions. Python-based Linux installations also need Tk support for the settings dialog. The installers do not change system permissions.
Settings
Right-click the tray icon and choose Settings…, or run:
lumitray settings
lumitray settings --min 20 --max 90
lumitray settings --min 25
lumitray settings --max 90
Defaults are 20–95%. Limits must be integers satisfying 5 <= minimum < maximum <= 100. Invalid updates leave the existing configuration untouched. Changes apply on the next scheduled sample and never save camera frames.
Commands
# Check platform, power source, and brightness support
lumitray diagnose
# Capture one frame and print only numeric luminance
lumitray sample
# Run one automatic adjustment cycle
lumitray once
# Change brightness slightly, verify it, then restore the original value
lumitray brightness-test --delta 5
# Create or remove per-user application launchers
lumitray install [--autostart]
lumitray uninstall
# Run in the background tray
lumitray tray
When running from the project without adding the console script to PATH, use .venv\Scripts\python.exe -m lumitray ... on Windows or .venv/bin/python -m lumitray ... on Linux.
Tray controls
The tray menu provides status, pause/resume, brightness bias, settings, quick calibration, automatic-adjustment enable/disable, login autostart, and Exit. Only one tray instance can run at a time.
Ambient-light response
The generic response interpolates between these normalized camera-luminance anchors:
| Camera-relative luminance | Target before bias and user limits |
|---|---|
| 0.00 | 20% |
| 0.08 | 25% |
| 0.20 | 40% |
| 0.40 | 55% |
| 0.60 | 70% |
| 0.80 | 85% |
| 1.00 | 95% |
The curve is inspired by adaptive-brightness research, but normalized camera luminance is not measured lux. Webcam exposure, gain, direction, and scene content vary. Quick calibration, brightness bias, smoothing, a deadband, and maximum-step limits let LumiTray adapt without abrupt changes.
Research references:
- Microsoft adaptive-brightness guidance: https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/sensors-adaptive-brightness
- Controlled screen-brightness study: https://jps.ecnu.edu.cn/EN/abstract/abstract9078.shtml
- Example of device-specific webcam/lux calibration: https://www.medrxiv.org/content/10.1101/2020.05.28.20115725v2.full-text
Platform details
Windows uses native WinRT MediaCapture through winsdk, captures a 320 × 240 JPEG directly into memory, and closes the capture session after every sample. OpenCV is the camera backend on Linux.
Linux standalone artifacts are built and CLI-smoke-tested in native CI; they are not hardware-verified from a Windows development machine.
Configuration and logs
Settings and logs are stored in the platform-specific user configuration/log directories reported by platformdirs. Configuration is JSON. Logs contain numeric status and error information, never images.
Development verification
python -m venv .venv
.venv/Scripts/python -m pip install -e ".[dev]" # Windows
.venv/Scripts/python -m pytest -q # Windows
.venv/Scripts/python -m build
The automated suite uses fake hardware. Real display verification is performed only by the explicit brightness-test command, which restores the original value in a finally path.
Limitations
External monitors, macOS, and every OEM-specific display driver are not guaranteed in this release. Long-duration battery-drain measurements require separate testing on each supported laptop model.
Metadata
Release files for lumitray 0.2.0
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 |
|---|---|---|---|---|
| lumitray-0.2.0.tar.gz | 28.3 kB | With provenance | Details for lumitray-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lumitray-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for lumitray-0.2.0-py3-none-any.whl |
Total release size: 52.3 kB
Release files / lumitray-0.2.0.tar.gz
| Download URL | lumitray-0.2.0.tar.gz |
|---|---|
| Size | 28.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ec05cecc0fdcbe44018735c5aef6339e23ef7b66819f78c0ed6df9245b9b123
|
|
BLAKE2b-256 checksum How to use checksums |
eac44b52f033531109abf339f4a8224a410d212ec7e19074f1d58cdc0ffbeec0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.
Transparency logRelease files / lumitray-0.2.0-py3-none-any.whl
| Download URL | lumitray-0.2.0-py3-none-any.whl |
|---|---|
| Size | 24.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ea3557aff8dbb8583f152a9d05c8f879b43087d7eae142fb7993df1fe3a2256
|
|
BLAKE2b-256 checksum How to use checksums |
31cf82a38eb4331b7c95933b8e1e7f917be8d4278c1a719a061a9626d84f6432
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.
Transparency logSecurity for lumitray 0.2.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for lumitray-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.
Transparency logA 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.