An x86_64 CISC GNU/Linux driver for Nanoleaf PC Screen Mirror
Dependencies1
- c99 compiler
- make
- hidapi
- libX11
- libXext
On Arch Linux
$ sudo pacman -S --needed base-devel hidapi libx11 libxextInstallation2
Build leafwire core
$ makeCreate the system user
$ sudo useradd -r -s /sbin/nologin -M leafwire
Set up the udev rule
$ echo 'SUBSYSTEM=="hidraw",'\
' ATTRS{idVendor}=="37fa",'\
' ATTRS{idProduct}=="8202",'\
' GROUP="leafwire",'\
' MODE="0660"' \
| sudo tee /etc/udev/rules.d/99-nanoleaf.rules
$ sudo udevadm control --reload && sudo udevadm trigger
Install binaries to /usr/local/bin and the unit to /etc/systemd/system
$ sudo make install
Enable the systemd service
$ sudo systemctl daemon-reload
$ sudo systemctl enable --now lwd
The daemon starts immediately and will start automatically on every boot.
Usage3
$ lwctl rainbow
$ lwctl solid --color 255,0,128
$ lwctl breathing --color 0,100,255
$ lwctl wave --color 255,50,0
$ lwctl reactive # syncs LEDs to screen content
$ lwctl off
$ lwctl statuslwctl and lwd talk over /run/leafwire/leafwire.sock by default. Set LEAFWIRE_SOCKET on both to use a different path.
The strip wraps around the monitor. Zone counts default to 10,10,10,10 (bottom, left, top, right) and can be tuned:
lwctl reactive --zones 12,8,12,8License4
This project is available under the MIT license. See the LICENSE.