Skip to main content

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 2 minutes by default, with a configurable 1–10 minute interval. On battery it pauses capture by default and resumes automatically when AC power returns.

Privacy and accuracy

  • Frames are processed in memory and are never saved.
  • On battery, capture and brightness changes are skipped by default; the camera stays closed.
  • Debug mode writes only numeric luminance, acquisition time, and brightness values to the rotating log; it never saves frames.
  • 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, including Python 3.14:

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 70 --max 100
lumitray settings --interval-minutes 2
lumitray settings --no-disable-on-battery
lumitray settings --debug

Defaults are 70–100% brightness, a 2-minute capture interval, Disable on battery enabled, and Debug mode disabled. Brightness limits must be integers satisfying 5 <= minimum < maximum <= 100. Capture intervals must be integers from 1 to 10 minutes. Invalid updates leave the existing configuration untouched. Saving from the tray applies the settings immediately when automatic adjustment is active; paused and disabled states are preserved. Camera frames are never saved.

Debug mode writes numeric luminance, acquisition time, and current/target brightness details to the rotating log file. It does not enable photo saving. Release builds disable debug logging unconditionally, even if a configuration file contains "debug_mode": true.

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.

When the camera cannot provide a frame, the tray tooltip and the disabled status area show a short category such as Camera not found, Camera in use, or Camera access blocked. The disabled detail row keeps the original technical error for diagnosis. LumiTray sends one tray notification when a new camera-error episode starts; a successful frame clears the error and restores the normal tooltip.

While a camera error is active, Retry now requests an immediate sample without waiting for the next interval. Quick fix is context-sensitive:

  • Camera not found: resets LumiTray's camera backend, attempts a non-administrative device rescan, and retries. If the camera is still unavailable, the item changes to Open Device Manager.
  • Camera in use: releases only LumiTray's camera handle and retries. LumiTray never closes other applications; persistent errors keep the instruction to close apps using the camera.
  • Camera access blocked: opens Windows camera privacy settings. LumiTray never changes permissions automatically.
  • Dark or covered lens: shows instructions to check the lens and lighting, then retries.
  • Invalid frame or driver failure: recreates the capture session and retries. Persistent driver failures offer Windows camera troubleshooting.
  • Unknown failure: runs the safe reset/retry sequence and preserves the original error in the detail row and log.

Quick fixes and Retry now never start concurrent captures. Repeated clicks coalesce into one pending request, and automatic retries remain bounded by the existing failure backoff. No recovery action kills other processes, installs drivers, changes privacy permissions, requires administrator rights, or saves a photo.

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:

Platform details

On Windows with Python 3.11–3.13, LumiTray uses native WinRT MediaCapture through winsdk, captures a 320 × 240 JPEG directly into memory, and closes the capture session after every sample. Python 3.14 uses OpenCV because winsdk does not yet provide Python 3.14 binaries. OpenCV is also 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 plus detailed debug lines only when debug mode is enabled, 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.4.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 lumitray 0.4.0
File Size Uploaded Provenance Actions
lumitray-0.4.0.tar.gz 40.6 kB With provenance Details for lumitray-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lumitray 0.4.0
File Interpreter ABI Platform Actions
lumitray-0.4.0-py3-none-any.whl Python 3 none any Details for lumitray-0.4.0-py3-none-any.whl

Total release size: 70.9 kB

Release files / lumitray-0.4.0.tar.gz

Download URL lumitray-0.4.0.tar.gz
Size 40.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5b6288917ac4fed114cbeada2af70bcd48191ca00484680ab23dd291c40cdc36
BLAKE2b-256 checksum
How to use checksums
2dff5028c81237c89ce6a9ce8954cc571f9be1750f4198935259c09cb0e4175b
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 5, 2026.

Transparency log

Release files / lumitray-0.4.0-py3-none-any.whl

Download URL lumitray-0.4.0-py3-none-any.whl
Size 30.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55877996dddd94904af4c350b2e5e2a35ad185327a0d79e76cf5b6f23084ec45
BLAKE2b-256 checksum
How to use checksums
c2d51ded5493ded659d059a80ee4407a89c3c8ad2ef9ed751ada38d92d3a71a3
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 5, 2026.

Transparency log

Security for lumitray 0.4.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.

Select from 2 files

Attestation for lumitray-0.4.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 5, 2026.

Transparency log

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.

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