r/coolgithubprojects • u/panzerranzer • 2m 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)
github.comWindows 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 ("In use - Microphone: app.exe"), 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.
How it detects use, without admin rights: on Windows, WASAPI capture sessions, Media Foundation's sensor activity monitor and the capture service that Windows.Graphics.Capture starts; on Linux, PipeWire/PulseAudio recording streams, open /dev/video* devices and KWin's screencast streams (Plasma on Wayland). No installer; the app itself makes no network connections. It runs with uv.
What it cannot see: on Windows, screen captures made through Desktop Duplication (DXGI) or GDI, for example ffmpeg's gdigrab or ddagrab, leave nothing a normal user can read, so the light stays grey; on Linux, captures in an X11 session. Details: https://github.com/6801318d8d/cam_mic_tray#what-it-cannot-see
Other limits: the Linux part (KDE Plasma) has not been tested on a real desktop yet, and 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 and tested on Windows 11. Feedback and bug reports are welcome.