#dynamic #configurable #organizing #backlighting

app plight

A configurable program for organizing dynamic backlighting

1 unstable release

0.1.0 Nov 24, 2024

#1 in #organizing

Download history 59/week @ 2024-11-18 63/week @ 2024-11-25

122 downloads per month

GPL-3.0 license

34KB
633 lines

PLight

A configurable program for organizing dynamic backlighting.

Setup

Step 1: Clone repo and compile

  1. Clone this repository with:
git clone https://github.com/pguin-sudo/plight /usr/src/plight
cd /usr/src/plight
  1. Build using cargo:
cargo build --release
  1. Add semantic link to bin:
sudo ln -s /usr/src/plight/target/release/plight /usr/bin/plight

Step 2: Setup arduino

Setup arduino with arduino-cli

  1. Move to the arduino directory:
cd /usr/src/plight/arduino
  1. Configure your setup in /src/plight/arduino/sketch.yaml:

  2. Edit permissions of your serial /dev/ttyUSBX:

sudo chmod 777 /dev/ttyUSBX 
  1. Compile:
arduino-cli compile 
  1. Upload:
arduino-cli upload 

Step 3: Create a systemd Service File

Create a systemd service file to manage the daemon:

  1. Create a new file called plight.service in /etc/systemd/system/:
sudo vim /etc/systemd/user/plight.service
  1. Add the following content to the file:
[Unit]
Description=PLight - dynamic backlighting

[Service]
ExecStart=/bin/plight
Restart=always

[Install]
WantedBy=default.target
  1. Change mode of USB device:
sudo vim /etc/udev/rules.d/99-usb-tty.rules
KERNEL=="ttyUSBX", MODE="0777"

Step 4: Start and Enable the Daemon

Run the following commands to start and enable the daemon:

systemctl --user start plight.service
systemctl --user enable plight.service

Step 4: Check the Logs

You can check the logs of your daemon using:

sudo journalctl -u plight.service -f

Dependencies

~12–38MB
~611K SLoC