-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlights
executable file
·41 lines (35 loc) · 1.11 KB
/
lights
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /bin/sh
#-- lights --#
# Change rgb lights on my PC
# (DISCLAIMER) OpenRGB is very very
# buggy when used on commandline, let
# alone in scripts. If your lights get
# bricked, just run this script in a
# loop, and it should (hopefully)
# start working again.
# Dependencies:
# - openrgb
# - Execute `openrgb` with sudo privileges without password.
# ~ ADIGEN
# check if openrgb is installed
if ! command -v openrgb >/dev/null 2>&1; then
echo "openrgb is not installed."
exit
fi
# xrdb doesn't work with ssh
#color_choosen=${1:-`xrdb -query | grep '*color5' | awk '{print $2}' | cut -c 2-`}
. "${HOME}/.cache/wal/colors.sh"
color_choosen=${1:-${color5:1}}
echo $color_choosen
rgb_command="openrgb --noautoconnect"
if [[ $1 == "0" ]]; then
${rgb_command} -d 0 -m Off
${rgb_command} -d 1 -m Off
${rgb_command} -d 3 -m Off
exit
fi
# Doesn't work needs workaround below
${rgb_command} -d 2 -c ${color_choosen} -m static -b 100
${rgb_command} -d 0 -c ${color_choosen} -m Rainbow -d 1 -c ${color_choosen} -m Rainbow
#${rgb_command} -d 0 -d 1 -d 2 -c ${color_choosen} -m static
${rgb_command} -d 3 -c ${color_choosen} -m Custom