Crates.io | plight |
lib.rs | plight |
version | 0.1.0 |
source | src |
created_at | 2024-11-24 18:34:25.503867 |
updated_at | 2024-11-24 18:34:25.503867 |
description | A configurable program for organizing dynamic backlighting. |
homepage | |
repository | https://github.com/pguin-sudo/plight |
max_upload_size | |
id | 1459497 |
size | 111,658 |
A configurable program for organizing dynamic backlighting.
git clone https://github.com/pguin-sudo/plight /usr/src/plight
cd /usr/src/plight
cargo build --release
sudo ln -s /usr/src/plight/target/release/plight /usr/bin/plight
Setup arduino with arduino-cli
cd /usr/src/plight/arduino
Configure your setup in /src/plight/arduino/sketch.yaml
:
Edit permissions of your serial /dev/ttyUSBX
:
sudo chmod 777 /dev/ttyUSBX
arduino-cli compile
arduino-cli upload
Create a systemd service file to manage the daemon:
plight.service
in /etc/systemd/system/
:sudo vim /etc/systemd/user/plight.service
[Unit]
Description=PLight - dynamic backlighting
[Service]
ExecStart=/bin/plight
Restart=always
[Install]
WantedBy=default.target
sudo vim /etc/udev/rules.d/99-usb-tty.rules
KERNEL=="ttyUSBX", MODE="0777"
Run the following commands to start and enable the daemon:
systemctl --user start plight.service
systemctl --user enable plight.service
You can check the logs of your daemon using:
sudo journalctl -u plight.service -f