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 ~= nil and (#privacy.microphone_users > 0 or #privacy.camera_users > 0)
    end),
}

State

mantle.privacy:get() returns PrivacyState, nil before the first push. A field marked ? may be absent.

FieldTypeDescription
camera_usersPrivacyUser[]One entry per process holding a /dev/videoN open; empty when none is. Only devices present when privacy started are watched.
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 PipeWire nodesscreencast_users
/proc/*/fd links to a /dev/videoN, rescanned on each inotify open or close of the devicecamera_users. A PipeWire Video/Source from the same pid only supplies the name

The PipeWire half shares audio’s thread. privacy pushes its first /proc scan as soon as it starts. Without PipeWire the microphone and screencast lists stay empty and camera_users keeps its first scan: the update loop ends with the PipeWire thread.

Gotchas

TrapFix
A webcam plugged in after privacy started never showsThe device list is read once at start. Restart the Supervisor
grim or wf-recorder never shows in screencast_userswlr-screencopy bypasses PipeWire; only portal screen captures appear

Source: supervisor/src/capabilities/privacy/