Script for the programmable LED matrix spacers for the Framework Laptop 16.
Find a file
2026-03-14 05:13:35 -04:00
extra delay before ending script after death 2026-03-14 04:51:25 -04:00
led_matrix randomly generate a matrix 2026-03-09 22:50:27 -04:00
patterns simplified 2026-03-09 22:50:41 -04:00
videos renamed folder 2026-03-07 17:06:47 -05:00
.gitignore Initial commit 2026-03-03 16:23:00 -05:00
index.py ImportError: this platform is not supported: ('failed to acquire X connection: Bad display name ""', DisplayNameError('')) 2026-03-14 05:13:35 -04:00
led-matrix.desktop desktop-file-validate'd 2026-03-07 21:23:05 -05:00
led-matrix.service restart all the time 2026-03-07 22:39:49 -05:00
LICENSE Initial commit 2026-03-03 16:23:00 -05:00
README.md hhh 2026-03-11 16:16:25 -04:00
requirements.txt updated numpy 2026-03-13 00:07:35 -04:00

LED Matrix

Small library and script for the Framework Laptop 16's programmable monochrome LED matrix spacers.

The library section is in the led_matrix directory, this wraps the serial ports and adds some nice to have functions for ease of use. python files in the root of the project are what I use to display on the LEDs.

Usage

Note

The script will need to have root permissions to access the LEDs. Commands needng root access are prefixed by #.

Tip

There is a .desktop file avaliable if you would like to use it for an application menu entry or autostart if you do not want or can not use SystemD.

Setup

python -m venv venv && ./venv/bin/pip install -r requirements.txt

or

python -m venv venv
source ./venv/bin/activate
pip install -r requirements.txt

Run

# ./venv/bin/python index.py

or

# source ./venv/bin/activate
# python index.py

Autostart

SystemD

# cp led-matrix.service /usr/lib/systemd/system
# systemctl enable led-matrix

QubesOS

QubesOS specific instructions:

Warning

You are adding extra attack surface by using this program.

Note

QubesOS may sometimes get confused and only attach one of the LEDs or not be consistant on the display order. It will also not let you assign the second LED in the Qubes Global Config GUI, you will need to use qvm-usb command instead. I assume it is because both displays use the same device ID but I don't know.

  1. Create a standalone qube, matrix-dvm, and make it a disposable template.
  2. Download this repository then go through the setup and autostart instructions in this qube.
  3. Create a named disposible qube, sys-matrix; use the standalone as a template.
  4. Make ths qube automatically start on boot.
  5. Assign the LEDs to this qube (your sys-usb port may be different).
    qvm-usb assign --verbose sys-matrix sys-usb:2-3.2
    qvm-usb assign --verbose sys-matrix sys-usb:2-3.3