Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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.

FieldTypeDescription
camera_usersPrivacyUser[]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_usersPrivacyUser[]Apps with a running PipeWire audio capture, one per name. Idle streams and sink-monitor captures are absent; a muted microphone still counts.
screencast_usersPrivacyUser[]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.

FieldTypeDescription
app_namestringPipeWire 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

SourceFeeds
Running Stream/Input/Audio PipeWire nodesmicrophone_users
Running Stream/Output/Video and portal Video/Source PipeWire nodesscreencast_users
Running Stream/Input/Video PipeWire nodes linked to a camera Video/Sourcecamera_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 devicecamera_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

TrapFix
grim or wf-recorder never shows in screencast_userswlr-screencopy bypasses PipeWire; only portal screen captures appear

Source: supervisor/src/capabilities/privacy/