5 releases (3 breaking)
0.4.1 | Nov 3, 2024 |
---|---|
0.4.0 | Oct 16, 2024 |
0.3.0 | Oct 11, 2024 |
0.2.0 | Oct 11, 2024 |
0.1.0 | Oct 9, 2024 |
#85 in Hardware support
25 downloads per month
19KB
337 lines
litra-autotoggle
💡 Automatically turn your Logitech Litra device on when your webcam turns on, and off when your webcam turns off (macOS and Linux only)
Supported devices
The following Logitech Litra devices, connected via USB, are supported:
Installation
macOS or Linux via Homebrew
- Install the latest version of
litra-autotoggle
by runningbrew tap timrogers/tap && brew install litra-autotoggle
. - Run
litra-autotoggle --help
to check that everything is working.
macOS or Linux via Cargo, Rust's package manager
- Install Rust on your machine, if it isn't already installed.
- Install the
litra-autotoggle
crate by runningcargo install litra-autotoggle
. - Run
litra-autotoggle --help
to check that everything is working and see the available commands.
macOS or Linux via direct binary download
- Download the latest release for your platform. macOS and Linux devices are supported.
- Add the binary to
$PATH
, so you can execute it from your shell. For the best experience, call itlitra-autotoggle
. - Run
litra-autotoggle --help
to check that everything is working.
Usage
In the background, using Homebrew Services (Homebrew installations only)
Run brew services start timrogers/tap/litra-autotoggle
.
litra-autotoggle
will run in the background, and your Litra will turn on when your webcam turns on, and off when your webcam turns off. If no Litra device is connected, the listener will keep on running, but will do nothing.
[!NOTE] When starting the service for the first time on a macOS device, you will receive a notification warning you about software running in the background.
From the command line
Just run litra-autotoggle
. Your Litra will turn on when your webcam turns on, and off when your webcam turns off.
The following arguments are supported:
--serial-number
to point to a specific Litra device. You can get the serial number using thelitra devices
command in thelitra
CLI.--require-device
to enforce that a Litra device must be connected. By default, the listener will keep running even if no Litra device is found. With this set, the listener will exit whenever it looks for a Litra device and none is found.--video-device
(Linux only) to watch a specific video device (e.g./dev/video0
). By default, all video devices will be watched.
Configuring udev
permissions (Linux only)
On most Linux operating systems, you will need to manually configure permissions using udev
to allow non-root
users to access and manage Litra devices.
To allow all users that are part of the video
group to access the Litra devices, copy the 99-litra.rules
file into /etc/udev/rules.d
.
Next, reboot your computer or run the following commands as root
:
# udevadm control --reload-rules
# udevadm trigger
Dependencies
~2–10MB
~113K SLoC