r/coolgithubprojects • u/panzerranzer • 10m 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;
- optionally (off by default), a short alarm sound every N minutes while something is in use.
How it detects use, without admin rights: on Windows, WASAPI capture sessions, Media Foundation's sensor activity monitor, and screen captures through Windows.Graphics.Capture or Desktop Duplication (DXGI); 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 copies made through GDI (BitBlt, for example ffmpeg's gdigrab), which Windows reports only to programs running as administrator, so the light stays grey; on Linux, any capture in an X11 session. Video-call and remote-desktop apps (Teams, Meet, Zoom, OBS, AnyDesk, TeamViewer) have not been tested yet. 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.