Update rgb-ocntrol

This commit is contained in:
Breizh 2021-01-16 00:27:10 +01:00
parent 4ab5ddf089
commit 08eacdd6a3

View file

@ -30,9 +30,19 @@ declare -A colors_name=(
[p]="pink"
)
if [[ "$1" == "off" ]]
then
openrgb -d 0 -c 000000 &>/dev/null
exit
elif [[ "$1" == "cycle" || "$#" -eq 0 ]]
then
openrgb -d 0 -m "Color Cycle" &>/dev/null
exit
fi
lumi=20
mode=${3:-Direct} # Direct, Pulse, Flashing, 'Color Cycle'
logo="$(hsv2rgb "${colors[${1:-r}]}" 100 "$lumi")"
fans="$(hsv2rgb "${colors[${2:-r}]}" 100 "$lumi")"
mode=${3:-Direct} # Direct, Pulse, Flashing
logo="$(hsv2rgb "${colors[${1}]}" 100 "$lumi")"
fans="$(hsv2rgb "${colors[${2:-$1}]}" 100 "$lumi")"
openrgb -d 0 -m "$mode" -c 000000,000000,"$logo","$logo","$fans",000000 &>/dev/null