diff options
| author | sommerfeld <sommerfeld@sommerfeld.dev> | 2026-09-17 15:05:35 +0100 |
|---|---|---|
| committer | sommerfeld <sommerfeld@sommerfeld.dev> | 2026-09-17 15:05:35 +0100 |
| commit | 3aa51a5c01e7832605705cb71dc9a14f315c6e79 (patch) | |
| tree | 0762f000e30b28a72ac1fe357d3ad4fc956dd1a5 /etc | |
| parent | 10b83c2c08eb7b102333d690c31b322dabc0719f (diff) | |
| download | dotfiles-3aa51a5c01e7832605705cb71dc9a14f315c6e79.tar.gz dotfiles-3aa51a5c01e7832605705cb71dc9a14f315c6e79.tar.bz2 dotfiles-3aa51a5c01e7832605705cb71dc9a14f315c6e79.zip | |
Prefer the dock camera and use the camera portal
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/systemd/system/integrated-camera-off@.service | 12 | ||||
| -rw-r--r-- | etc/udev/rules.d/60-camera-priority.rules | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/etc/systemd/system/integrated-camera-off@.service b/etc/systemd/system/integrated-camera-off@.service new file mode 100644 index 0000000..6d7eaf8 --- /dev/null +++ b/etc/systemd/system/integrated-camera-off@.service @@ -0,0 +1,12 @@ +[Unit] +Description=Disable the integrated camera while the HP camera is connected +BindsTo=%i.device +After=%i.device + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecCondition=/usr/bin/grep -qx 13d3 /sys/bus/usb/devices/1-8/idVendor +ExecCondition=/usr/bin/grep -qx 56a6 /sys/bus/usb/devices/1-8/idProduct +ExecStart=/usr/bin/sh -c 'printf 0 > /sys/bus/usb/devices/1-8/authorized' +ExecStop=-/usr/bin/sh -c 'printf 1 > /sys/bus/usb/devices/1-8/authorized' diff --git a/etc/udev/rules.d/60-camera-priority.rules b/etc/udev/rules.d/60-camera-priority.rules new file mode 100644 index 0000000..a12d5a6 --- /dev/null +++ b/etc/udev/rules.d/60-camera-priority.rules @@ -0,0 +1,2 @@ +# Disable the integrated camera while the HP external camera is connected. +ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="03f0", ATTR{idProduct}=="794a", TAG+="systemd", ENV{SYSTEMD_WANTS}+="integrated-camera-off@.service" |
