Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌿 leafwire

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 libxext

Installation2

Build leafwire core

$ make

Create 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 status

lwctl and lwd talk over /run/leafwire/leafwire.sock by default. Set LEAFWIRE_SOCKET on both to use a different path.

Zone layout

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,8

License4

This project is available under the MIT license. See the LICENSE.

Footnotes

  1. Leafwire dependencies

  2. Leafwire installation

  3. Using leafwire

  4. Licensing options

About

An x86_64 CISC GNU/Linux driver for Nanoleaf PC Screen Mirror

Resources

Stars

22 stars

Watchers

3 watching

Forks

Used by

Contributors

Languages