-
Notifications
You must be signed in to change notification settings - Fork 87
PluginCamera
Display camera usage indicator for privacy awareness.
ON # Camera active - blue/info
(hidden) # Camera inactive - not shown
| Property | Value |
|---|---|
| Platform | macOS, Linux |
| Dependencies | Built-in (macOS), lsof (Linux, optional) |
| Content Type | dynamic |
| Presence | conditional |
# macOS - no dependencies needed (uses built-in camera daemons)
# Linux (Debian/Ubuntu)
sudo apt install lsof
# Linux (Fedora)
sudo dnf install lsof
# Linux (Arch)
sudo pacman -S lsof# Enable plugin
set -g @powerkit_plugins "camera"# Enable plugin
set -g @powerkit_plugins "camera"
# Icon
set -g @powerkit_plugin_camera_icon ""
# Cache duration (seconds) - check frequently for privacy
set -g @powerkit_plugin_camera_cache_ttl "2"| Option | Type | Default | Description |
|---|---|---|---|
@powerkit_plugin_camera_icon |
icon | |
Camera active icon |
@powerkit_plugin_camera_cache_ttl |
number | 2 |
Cache duration in seconds |
@powerkit_plugin_camera_show_only_on_threshold |
bool | false |
Not applicable for this plugin |
| State | Condition | Visibility |
|---|---|---|
active |
Camera is in use | Visible |
inactive |
Camera is not in use | Hidden |
| Level | Condition | Color |
|---|---|---|
info |
Camera is active (informational indicator) | Blue |
Note: Camera activity uses info health level to provide a neutral visual indicator without implying a problem.
The plugin does not return context values (empty string).
Monitors camera-related system processes:
| Process | Description |
|---|---|
VDCAssistant |
Video Digitizer Camera Assistant |
appleh16camerad |
Apple H16 Camera Daemon |
cameracaptured |
Camera Capture Daemon |
UVCAssistant |
USB Video Class Assistant |
Detection criteria:
- Process must be running
- CPU usage ≥ 1% (indicates active use)
Checks device files for camera access:
# Method 1: lsof
lsof /dev/video*
# Method 2: fuser (fallback)
fuser /dev/video*set -g @powerkit_plugins "camera"Combine with microphone for complete privacy awareness:
set -g @powerkit_plugins "camera,microphone"set -g @powerkit_plugins "camera"
set -g @powerkit_plugin_camera_icon "📷"Reduce cache TTL for near real-time updates:
set -g @powerkit_plugins "camera"
set -g @powerkit_plugin_camera_cache_ttl "1"Note: Lower cache TTL increases CPU usage slightly.
Visual indicator during video calls:
set -g @powerkit_plugins "camera,microphone"
# Shows when camera and/or mic are activeKnow when your camera is on during meetings:
set -g @powerkit_plugins "camera,datetime"
# Camera indicator appears during video callsMonitor when screen recording or video capture is active:
set -g @powerkit_plugins "camera"
# Appears when recording software uses cameraIf the indicator persists even when no apps are using the camera:
macOS:
-
Check running camera processes:
ps aux | grep -i camera ps aux | grep VDCAssistant
-
Force quit camera processes:
sudo killall VDCAssistant sudo killall AppleCameraAssistant
-
Check which apps have camera access:
- System Settings → Privacy & Security → Camera
Linux:
-
Check device usage:
lsof /dev/video0 fuser -v /dev/video0
-
Identify the process:
lsof /dev/video* | grep -v COMMAND
macOS:
-
Verify camera processes start when using camera:
# Open Photo Booth or FaceTime # Then check: ps aux | grep VDCAssistant
-
The plugin requires CPU usage ≥1% for detection:
# Check CPU usage of camera processes top -l 1 | grep -i camera
Linux:
-
Check if lsof is installed:
which lsof
-
Install if missing:
sudo apt install lsof
-
Verify camera device exists:
ls -l /dev/video* -
Test camera access:
# Install v4l-utils sudo apt install v4l-utils v4l2-ctl --list-devices
If lsof requires elevated permissions:
# Add user to video group
sudo usermod -aG video $USER
# Log out and back in| Platform | Detection | Accuracy | Notes |
|---|---|---|---|
| macOS | Process monitoring | High | Checks CPU usage to avoid false positives |
| Linux | Device file access | Medium | Requires lsof or fuser |
- macOS: Lightweight process monitoring
- Linux: lsof adds minimal overhead
- Default cache TTL is 2 seconds
- Frequent polling (low cache TTL) increases CPU usage slightly
- Plugin only detects camera usage, doesn't control it
- Provides passive monitoring for awareness
- No data is logged or transmitted
- Purely local detection
- May not detect all third-party camera apps
- Some camera processes may be low CPU when idle but still active
- Background camera access might not be detected
- Requires lsof or fuser for reliable detection
- Some containerized applications may not be detected
- Virtual camera devices (v4l2loopback) may show as active
- FaceTime
- Photo Booth
- Zoom, Teams, Slack (video calls)
- OBS Studio
- QuickTime Player (video recording)
- Safari/Chrome (WebRTC)
- Cheese (webcam app)
- Zoom, Teams (video calls)
- Firefox/Chrome (WebRTC)
- OBS Studio
- ffmpeg/v4l2 capture tools
- PluginMicrophone - Microphone mute status
- PluginBluetooth - Bluetooth device status
- PluginAudiodevices - Audio device selector