A configurable program for organizing dynamic backlighting.
- Clone this repository with:
git clone https://github.com/pguin-sudo/plight /usr/src/plight
cd /usr/src/plight- Build using cargo:
cargo build --release- Add semantic link to bin:
sudo ln -s /usr/src/plight/target/release/plight /usr/bin/plightSetup arduino with arduino-cli
- Move to the arduino directory:
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 - Compile:
arduino-cli compile
- Upload:
arduino-cli upload Create a systemd service file to manage the daemon:
- Create a new file called
plight.servicein/etc/systemd/system/:
sudo vim /etc/systemd/user/plight.service- Add the following content to the file:
[Unit]
Description=PLight - dynamic backlighting
[Service]
ExecStart=/bin/plight
Restart=always
[Install]
WantedBy=default.target- Change mode of USB device:
sudo vim /etc/udev/rules.d/99-usb-tty.rulesKERNEL=="ttyUSBX", MODE="0777"
Run the following commands to start and enable the daemon:
systemctl --user start plight.service
systemctl --user enable plight.serviceYou can check the logs of your daemon using:
sudo journalctl -u plight.service -f