summaryrefslogtreecommitdiff
path: root/dotfiles/common/.local/bin/logitech-brio-settings.sh
blob: 104c8808a84751c185337a685adec0614c1d8a39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# Apply saved camera settings for Logitech BRIO
# Triggered by udev rule on USB connect
# Settings dialed in via cameractrls on 2026-02-08

DEVICE="$1"

if [ -z "$DEVICE" ]; then
    # Find the BRIO's main video device
    DEVICE=$(v4l2-ctl --list-devices 2>/dev/null | grep -A1 "Logitech BRIO" | grep /dev/video | head -1 | tr -d '[:space:]')
fi

[ -z "$DEVICE" ] && exit 1

sleep 2  # Give the device time to initialize

v4l2-ctl -d "$DEVICE" \
    --set-ctrl=brightness=85 \
    --set-ctrl=contrast=88 \
    --set-ctrl=saturation=128 \
    --set-ctrl=sharpness=163 \
    --set-ctrl=backlight_compensation=0 \
    --set-ctrl=power_line_frequency=2 \
    --set-ctrl=white_balance_automatic=0 \
    --set-ctrl=white_balance_temperature=3050 \
    --set-ctrl=auto_exposure=3 \
    --set-ctrl=exposure_dynamic_framerate=1 \
    --set-ctrl=focus_automatic_continuous=1 \
    --set-ctrl=zoom_absolute=136 \
    --set-ctrl=pan_absolute=-10800 \
    --set-ctrl=tilt_absolute=0