#!/bin/bash

# omarchy:summary=Let Chromium use the cameras of Snapdragon and Intel IPU7 laptops

set -euo pipefail

# Snapdragon and Intel IPU7 MIPI cameras reach apps through PipeWire, and
# Chromium keeps PipeWire camera capture off unless WebRtcPipeWireCamera is on.
# Other machines keep Chromium's own V4L2 capture.
if omarchy-hw-aarch64-qualcomm || grep -q "OVTI08F4" /sys/bus/acpi/devices/*/hid 2>/dev/null; then
  omarchy-chromium-add-feature WebRtcPipeWireCamera
fi
