Omahub
← All plugins
M

Camera Preview

by Mandavkar Pranjal

Live camera preview popup with device picker and snapshot capture

Security review

Review recommended · 1 finding

Deterministic scan — not a security guarantee

Low
Risk level
Low
Analyzed commit
e0ecd70
Scanned
1 month ago

Flagged patterns appear only in documentation files (README / docs) — descriptive examples, not executable code.

  • Docs external_hosts README.md:60

    Downloads or connects to an external HTTP(S) host.

    git clone https://github.com/MandavkarPranjal/cam-preview.git ~/.config/omarchy/plugins/mandavkarpranjal.cam-preview

Automated analysis only — not a security guarantee.

AI advisory review

No obvious issues detected

Language-model assessment · ~deepseek/deepseek-v4-flash-latest — advisory only

Low
AI risk level
Low
Recommendation
install
Model
~deepseek/deepseek-v4-flash-latest
Analyzed commit
e0ecd70
Reviewed
1 month ago

The plugin is a straightforward camera preview bar widget: it opens the selected webcam only when the user opens the popup, saves snapshots locally to ~/Pictures, and performs no network communication or hidden actions. The deterministic scan's only finding is a git clone command in the README, which is documentation and not executed by the plugin. The install script only copies or symlinks files into the Omarchy plugin directory and contains no destructive or suspicious behavior.

  • Camera access is privacy-sensitive, but it is explicitly user-initiated via the widget and the plugin does not transmit camera data anywhere.
  • The sampled Panel.qml is truncated in the review bundle, so the full QML was not independently verified; however, no dangerous patterns were present in the reviewed portion.
How this check works

This review combines the deterministic scan (the rule-based results above) with an independent look at the plugin's code by a language model. The model reads a trimmed sample of the repository's files, the manifest, and the README, then gives a plain-language risk level and a recommendation: install (no notable danger), review (look closer first), or avoid (clearly dangerous).

It runs on the same analyzed commit as the deterministic scan and is strictly advisory — it is not a security guarantee and never blocks a plugin by itself. A human moderator still reviews plugins before they are listed.

AI advisory only — automated analysis, not a security guarantee.

Install
$ omarchy plugin add https://github.com/MandavkarPranjal/cam-preview --enable
Widgets #bar #quickshell #media

Camera Preview (mandavkarpranjal.cam-preview)

A live camera preview bar widget for Omarchy. The bar gets a camera icon; clicking it opens a popup with a live preview of your webcam, a device picker, a mirror toggle, and a snapshot button.

Features

  • Live preview rendered as a fast "slideshow" of still captures (works around Qt's FFmpeg camera backend, which neither paints late-mounted VideoOutputs nor releases the sensor on Camera.active = false)
  • Sensor fully released when the popup closes — no /dev/video0 left open
  • Camera device picker (persisted in shell.json), default "Auto"
  • Mirror toggle (default on, like a front-facing camera; snapshots are always saved unmirrored)
  • Snapshot capture: click the bar icon with the right mouse button, or the Snapshot button in the popup — saves ~/Pictures/camera-preview-<timestamp>.jpg
  • IPC: omarchy-shell mandavkarpranjal.cam-preview toggle|takeSnapshot|setMirror <true|false>

Requirements

  • Omarchy shell (Quickshell-based) with the bar plugin
  • A working v4l2 webcam
  • A Nerd Font for the icon glyphs (JetBrainsMono Nerd Font ships with Omarchy)

Installation

Install with the Omarchy CLI (recommended):

omarchy plugin add https://github.com/MandavkarPranjal/cam-preview.git --enable --yes
omarchy restart shell

--enable adds the widget to the bar and enables it; --yes skips the confirmation prompt. Then add the widget from the Omarchy settings panel (bar layout editor, category System) if you prefer the GUI route.

The plugin directory name must match the plugin id (mandavkarpranjal.cam-preview); omarchy plugin add handles this for you.

Updates

omarchy plugin update mandavkarpranjal.cam-preview --yes
omarchy restart shell

Removal

omarchy plugin remove mandavkarpranjal.cam-preview --yes

Manual / development install

Clone straight into the Omarchy user plugin dir, or use the helper script:

git clone https://github.com/MandavkarPranjal/cam-preview.git ~/.config/omarchy/plugins/mandavkarpranjal.cam-preview
./install.sh            # copies into ~/.config/omarchy/plugins/mandavkarpranjal.cam-preview
./install.sh --link     # symlinks instead (handy for development)
./install.sh --remove   # removes the installed copy

Usage

Action How
Open / close preview Left-click the camera icon in the bar
Take a snapshot Right-click the bar icon, or the Snapshot button
Pick a camera Dropdown in the popup header
Mirror / unmirror Mirror button in the popup header (or setMirror IPC)

Snapshots land in ~/Pictures/camera-preview-*.jpg.

Settings

Stored as flat keys on the widget's entry in ~/.config/omarchy/shell.json (e.g. "mirror": true); editable there or via the settings panel.

Key Default Description
device auto Camera device id, or auto for the system default
previewWidth 480 Preview width in the popup (240-960, 16:9)
mirror true Flip the preview horizontally; snapshots unaffected

Troubleshooting

  • Stale behavior after editing QML: the shell hot-reload reuses the old compiled component — run omarchy restart shell after any change.
  • No camera found: check v4l2-ctl --list-devices and that your user can open /dev/video0 (video group / loginctl).
  • FPS: the sensor self-limits to ~15-30 fps per still capture; that is normal for this architecture.

License

MIT — see LICENSE.