Add installation script, default state file, and update README for Acer RGB control

This commit is contained in:
Fernando Crespo
2026-01-30 16:59:42 -03:00
parent 4c1c7a5477
commit 44cfb84a5f
6 changed files with 113 additions and 1 deletions

18
acer-rgb Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -euo pipefail
SOCK="/run/acer-rgbd.sock"
if [[ $# -lt 1 ]]; then
echo "Usage:"
echo " acer-rgb GET"
echo " acer-rgb SET hidraw=/dev/hidraw2 dev=keyboard effect=static bright=80 r=255 g=0 b=0 zone=all"
exit 2
fi
cmd="$*"
if command -v socat >/dev/null 2>&1; then
printf "%s\n" "$cmd" | socat - UNIX-CONNECT:"$SOCK"
else
printf "%s\n" "$cmd" | nc -U "$SOCK"
fi