privacy
Apps using the camera, microphone or screen capture right now.
rect {
width = 8,
height = 8,
radius = 4,
background = "#F38BA8",
visible = mantle.privacy:map(function(privacy)
return #privacy.microphone_users > 0 or #privacy.camera_users > 0
end, false),
}
State
mantle.privacy:get() returns PrivacyState, nil before the first push. A field marked ? may be absent.
| Field | Type | Description |
|---|---|---|
camera_users | PrivacyUser[] | Apps using a camera, one per name: running PipeWire video streams linked to a camera, and processes holding a /dev/videoN open outside PipeWire. Empty when none is. |
microphone_users | PrivacyUser[] | Apps with a running PipeWire audio capture, one per name. Idle streams and sink-monitor captures are absent; a muted microphone still counts. |
screencast_users | PrivacyUser[] | Apps with a running PipeWire screen-capture stream, one per name. wlr-screencopy tools such as wf-recorder and grim never appear. |
PrivacyUser
One app using a camera, microphone or screen capture.
| Field | Type | Description |
|---|---|---|
app_name | string | PipeWire application.name, else /proc/<pid>/comm, else "pid 1234" (or "node 56"); never empty. |
Actions
None: read-only, so any method but get, map and on_change raises.
Backend
| Source | Feeds |
|---|---|
Running Stream/Input/Audio PipeWire nodes | microphone_users |
Running Stream/Output/Video and portal Video/Source PipeWire nodes | screencast_users |
Running Stream/Input/Video PipeWire nodes linked to a camera Video/Source | camera_users, named by the app. A viewer of a screen-share source is not counted |
/proc/*/fd links to a /dev/videoN, rescanned on each inotify open or close of the device | camera_users for apps using V4L2 directly. The PipeWire daemon is skipped, since it holds the device for the apps above |
The PipeWire half shares audio’s thread. privacy pushes its first /proc
scan as soon as it starts. While PipeWire is down, or before it first answers, the microphone and
screencast lists are empty and cameras used through PipeWire are missing; all refill when it
reconnects.
Gotchas
| Trap | Fix |
|---|---|
grim or wf-recorder never shows in screencast_users | wlr-screencopy bypasses PipeWire; only portal screen captures appear |