Skip to content

clstaudt/das-blinkenlight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Das blinkenlight

Drive a Blink(1) mk3 USB LED to display real-time GPU and CPU utilisation on an Apple Silicon Mac.

LED Metric Colour Idle → Full
1 (top) GPU Active Residency Magenta (val, 0, val) Dark → Bright
2 (bottom) CPU usage Cyan (0, val, val) Dark → Bright

Install

Prerequisites

  • macOS on Apple Silicon (uses powermetrics GPU sampler)
  • blink1-toolbrew install blink1
  • uvbrew install uv (or any Python package installer)

1. Allow passwordless sudo for powermetrics

sudo visudo -f /etc/sudoers.d/powermetrics

Add this single line (replace cls with your username):

cls ALL=(root) NOPASSWD: /usr/bin/powermetrics

Save and exit. Verify:

sudo -n /usr/bin/powermetrics --samplers gpu_power -i 1000 -n 1

2. Install blinkenlight

uv tool install .          # from a local checkout

This puts the blinkenlight command on your $PATH.

3. Test manually

blinkenlight run
[info] blinkenlight starting (pid 12345)
[load] GPU  12.3% → rgb(31,0,31)  | CPU   8.5% → rgb(0,21,21)

Press Ctrl-C — both LEDs turn off cleanly.

4. Install as a background service

blinkenlight install

This generates a launchd plist (with the correct paths resolved automatically), copies it to ~/Library/LaunchAgents/, and loads it. It will start on every login and restart on crash.

Usage

blinkenlight run          # start the monitor (foreground)
blinkenlight install      # install + start the launchd agent
blinkenlight uninstall    # stop + remove the launchd agent
blinkenlight status       # check if the agent is loaded

Managing the service

blinkenlight status       # is it running?
blinkenlight uninstall    # stop and remove
blinkenlight install      # (re)install and start

View logs:

tail -f /tmp/blinkenlight.log    # stdout
tail -f /tmp/blinkenlight.err    # stderr

Development

uv tool install -e .      # editable install for development
blinkenlight run          # run directly

About

Drive a Blink(1) mk3 USB LED to display real-time GPU and CPU utilisation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages