Update rgb-ocntrol
This commit is contained in:
parent
5891b7367a
commit
b16bf69135
1 changed files with 13 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue