summaryrefslogtreecommitdiffstatshomepage
path: root/etc/systemd/system/integrated-camera-off@.service
diff options
context:
space:
mode:
authorsommerfeld <sommerfeld@sommerfeld.dev>2026-09-17 15:05:35 +0100
committersommerfeld <sommerfeld@sommerfeld.dev>2026-09-17 15:05:35 +0100
commit3aa51a5c01e7832605705cb71dc9a14f315c6e79 (patch)
tree0762f000e30b28a72ac1fe357d3ad4fc956dd1a5 /etc/systemd/system/integrated-camera-off@.service
parent10b83c2c08eb7b102333d690c31b322dabc0719f (diff)
downloaddotfiles-3aa51a5c01e7832605705cb71dc9a14f315c6e79.tar.gz
dotfiles-3aa51a5c01e7832605705cb71dc9a14f315c6e79.tar.bz2
dotfiles-3aa51a5c01e7832605705cb71dc9a14f315c6e79.zip
Prefer the dock camera and use the camera portal
Diffstat (limited to 'etc/systemd/system/integrated-camera-off@.service')
-rw-r--r--etc/systemd/system/integrated-camera-off@.service12
1 files changed, 12 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'