Skip to main content

A lightweight Windows overlay manager and client library for creating click through overlay windows.

Project description

overlays

A lightweight Windows overlay manager and client library for creating click through overlay windows: highlights, countdowns, elapsed timers, and QR codes, all communicated over a named pipe. This project is licensed under the Apache License 2.0. See the LICENSE file for details.

OverlayManager in action

Features

  • Highlight Windows: Draw colored rectangles around screen regions for attention-grabbing highlights.
  • Countdown Timers: Display a countdown clock with a custom message.
  • Elapsed Time Windows: Track and display elapsed time since creation.
  • QR Code Overlays: Render QR codes with captions.
  • Named-Pipe IPC: Send commands from your application to the overlay manager via a simple pipe.
  • Graceful Shutdown: Press Ctrl+C or send SIGTERM to clean up windows and threads.

Requirements

  • Windows 10 or later (older Versions might work but aren't supported)
  • Python 3.10+
  • Dependencies: pywin32, qrcode

Getting Started

1a. Run the Overlay Manager

The overlay manager hosts a named-pipe server and listens for overlay commands.
To run the manager, simply use the following uv command:

uvx overlays

You should see the following output:

🔧 OverlayManager - Windows Overlay Application
================================================
✅ Signal handlers configured
🚀 Starting OverlayManager...
✅ OverlayManager initialized successfully
📡 Named pipe server: \\.\pipe\overlay_manager
🎯 Application ready - overlay windows can now be created
💡 Press Ctrl+C to shutdown gracefully

1b. Run the Overlay Manager with env vars

Specify your environment variables in your .env file or in your terminal, i.e. OVERLAY_PIPE_NAME="overlay_manager_env"

Afterwards run the overlay manager:

uvx overlays

You should see the following allowed arguments:

🔧 OverlayManager - Windows Overlay Application
================================================
✅ Signal handlers configured
🚀 Starting OverlayManager...
✅ OverlayManager initialized successfully
📡 Named pipe server: \\.\pipe\overlay_manager_env
🎯 Application ready - overlay windows can now be created
💡 Press Ctrl+C to shutdown gracefully

Supported env vars:

Variable Description
OVERLAY_PIPE_NAME Defines the name of the win32 pipe

2. Embed the OverlayClient in Your Code

Import and instantiate the OverlayClient to send overlay commands:

from overlays.client import OverlayClient

# Create one client to connect to the manager's pipe
overlay = OverlayClient()

# Create a highlight window
overlay.create_highlight_window(rect=(100, 100, 400, 300), timeout_seconds=5)

# Create a 10-second countdown
overlay.create_countdown_window(message_text="Get ready!", countdown_seconds=10)

# Create an elapsed-time window
overlay.create_elapsed_time_window(message_text="Session Length")

# Show a QR code for some data
overlay.create_qrcode_window(data={"url": "https://example.com"}, duration=15, caption="Scan me")

# Update a window's message
overlay.update_window_message(window_id=2, new_message="Halfway there...")

# Close a specific window
overlay.close_window(window_id=1)

# Take and cancel breaks
overlay.take_break(duration_seconds=60)
overlay.cancel_break()

IPC Commands Reference

Command Args Description
create_highlight_window rect: (l, t, r, b), timeout_seconds: int Shows a colored rectangle for a duration.
create_countdown_window message_text: str, countdown_seconds: int Starts a countdown timer.
create_elapsed_time_window message_text: str Displays elapsed time since creation.
create_qrcode_window data: str | dict, duration: int, caption: str Renders a QR code overlay.
update_window_message window_id: int, new_message: str Changes the text of a countdown/elapsed window.
close_window window_id: int Closes any overlay window (countdown, elapsed, highlight, or QR code).
take_break duration_seconds: int Holds incoming commands for a break period.
cancel_break (none) Cancels any active break and discards pending commands.

Graceful Shutdown

Press Ctrl+C in the console running main.py, or send a SIGTERM signal. The manager will clean up all open windows and exit.

Contributing

Contributions are always welcome!
The following steps should be used:

  1. Fork the repo.
  2. Create a feature branch.
  3. Submit a pull request—happy to review improvements!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

overlays-1.6.1.tar.gz (9.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

overlays-1.6.1-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file overlays-1.6.1.tar.gz.

File metadata

  • Download URL: overlays-1.6.1.tar.gz
  • Upload date:
  • Size: 9.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","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":true}

File hashes

Hashes for overlays-1.6.1.tar.gz
Algorithm Hash digest
SHA256 f7e38cf32f1c4b15c374741367685b55e0ce3485ac33dd0b7948e1fdf9e63e6f
MD5 1d7e9dff518039297cede551f706495f
BLAKE2b-256 fb67e5868adc1e984e1902b77b61016b30c9601905b013293f974c37e2b3e29d

See more details on using hashes here.

File details

Details for the file overlays-1.6.1-py3-none-any.whl.

File metadata

  • Download URL: overlays-1.6.1-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","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":true}

File hashes

Hashes for overlays-1.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ffc0c852876ecc8201a5d970e3bd8c40a8cb76849736316c2d0a00eb485ff082
MD5 1365d00907ffaa34a0e2f2bde0ad80f4
BLAKE2b-256 bc51f586f563699337318d7646043a56141fc8a82236bd5aa8e090f31c77727e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page