update no-rgb service

This commit is contained in:
Simon Gardling 2024-10-02 21:33:54 -04:00
parent 09a04528a6
commit 840febfc16
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D

View File

@ -67,9 +67,11 @@
let
no-rgb = pkgs.writeScriptBin "no-rgb" ''
#!/bin/sh
NUM_DEVICES=$(${pkgs.openrgb}/bin/openrgb --noautoconnect --list-devices | grep -E '^[0-9]+: ' | wc -l)
set -e
for i in $(seq 0 $(($NUM_DEVICES - 1))); do
NUM_DEVICES=$(${pkgs.openrgb}/bin/openrgb --noautoconnect --list-devices | ${pkgs.gnugrep}/bin/grep -E '^[0-9]+: ' | ${pkgs.coreutils}/bin/wc -l)
for i in $(${pkgs.coreutils}/bin/seq 0 $(($NUM_DEVICES - 1))); do
${pkgs.openrgb}/bin/openrgb --noautoconnect --device $i --mode direct --color 000000
done
'';