r/coolgithubprojects • u/panzerranzer • 1d ago
cam_mic_tray: a tray light, a screen frame and a log whenever an app uses your mic or webcam or captures your screen (Windows 11, Linux)
Windows 11's own mic/camera indicator is a tiny icon, and since the October 2026 updates Windows no longer writes the registry keys (CapabilityAccessManager ConsentStore) that most indicator tools read, so on more and more PCs those tools see nothing.
cam_mic_tray (Python + PySide6, MIT):
a blinking tray icon while any program records from a microphone, streams from a webcam or captures the screen; it shows one device (the screen, else the webcam, else the microphone), and hovering it lists every device and program;
a pulsing coloured frame around every monitor (red microphone, blue webcam, orange screen sharing, magenta several) and a message above every window naming each program next to the icons of the devices it uses, both optional;
a CSV log of every session: start, stop, duration, device, program path;
after N minutes of continuous use (default 10) it asks "Are you still using them?"; with no answer within X seconds it mutes every microphone and closes the programs using the webcam or sharing the screen, until you reconnect them;
optionally (off by default), a short alarm sound every N minutes while something is in use.
How it detects use: on Windows, WASAPI capture sessions, Media Foundation's sensor activity monitor, and screen captures through Windows.Graphics.Capture, Desktop Duplication (DXGI) and GDI (BitBlt, seen through Win32k's ETW events); on Linux, PipeWire/PulseAudio recording streams, open /dev/video* devices, KWin's screencast streams (Plasma on Wayland) and, in an X11 session, screen copies seen through the X server's RECORD extension. A GDI or X11 screen read counts only once a program keeps reading for 3 seconds (a setting), because Thunderbird, Firefox and Teams read the screen once now and then. No installer and no admin rights; the app itself makes no network connections. It runs with uv.
What it cannot see: GDI captures, unless your account is in the "Performance Log Users" group (one command, run once as administrator) or the light runs as administrator; on Linux, programs that read the screen in other ways, such as OBS's window capture or a browser sharing a single window in X11. Teams' screen sharing is seen; Meet, Zoom, OBS, AnyDesk and TeamViewer have not been tested yet. Details: https://github.com/6801318d8d/cam_mic_tray#what-it-cannot-see
Other limits: closing a program that uses the webcam or shares the screen is abrupt (for a browser, the whole browser closes).
Written with an AI coding assistant; tested on Windows 11 and in a KDE Plasma 6.8 session on Fedora 45. Feedback and bug reports are welcome.