sylware / nyanlinux (public) (License: AFFERO GPLv3) (since 2019-09-09) (hash sha1)
scripts for a lean, from scratch, amd hardware, linux distro
List of commits:
Subject Hash Author Date (UTC)
steelseries rival3 b98d369ceb00428c3f5cf4747731676e6da60bfc Sylvain BERTRAND 2021-11-08 21:49:55
gfx stack update 68b23aba2c97f765428a34996b903b422462d927 Sylvain BERTRAND 2021-11-07 17:23:37
we can compile gcc 10.3.0 with gcc 4.7.4 (THE canonical gcc) 43cf1d265741bcedf42a818c6290774d70925554 Sylvain BERTRAND 2021-11-03 02:29:55
mesa-vulkan: fix from the mesa devs for navi10 XLE d1a76cb836c0dcfd49e127edd9aa3d4a3c13c7f3 Sylvain BERTRAND 2021-11-02 16:35:11
gfx stack update (vulkan still glitched) 5d0a8bbb9a8196ca83d44c64a1c7c11822347bf0 Sylvain BERTRAND 2021-10-31 21:54:53
nyanmp: update da9dd0a3a895bc9e43bc27eadc31f38e1498fd9a Sylvain BERTRAND 2021-10-30 19:23:18
lynk:update to dev10 282d91c6070e696e814560675fadd7bce897b1e2 Sylvain BERTRAND 2021-10-28 18:54:15
vulkan:radv:llvm is deprecated 7af270c7c22baf9682d117fe4ac5e05982f78ae4 Sylvain BERTRAND 2021-10-24 17:52:56
gfx stack update (vulkan still glitched) 9181fb18bd40939585ae68fcab9993a69559f47b Sylvain BERTRAND 2021-10-24 14:40:12
gfx stack update (vulkan is glitch) 2b9a609757d4bf8ff6442d2d93d85d8e16a51c37 Sylvain BERTRAND 2021-10-17 19:02:47
nyanmp: update f2b42c864f933922ec4362f2fa0b37b3c7f392db Sylvain BERTRAND 2021-10-10 17:10:04
links: update to 2.25 d55f72f6b1aadbc6da764fa5a30194623b34c489 Sylvain BERTRAND 2021-10-10 16:24:40
gfx stack update 9211d39f163939567b9bf2bf2f8a8fac0ec2ff74 Sylvain BERTRAND 2021-10-10 14:21:17
gfx stack update e1e496417589f98088d5976b474b50fc79981eef Sylvain BERTRAND 2021-10-03 19:30:13
gfx stack update (new bad dev spotted) 119fabe05f2ec0509910b56b1dbbce021807e24d Sylvain BERTRAND 2021-09-26 17:26:37
gfx stack update (radv fixed last llvm breaking tantrum). e85ac11e4e3b94d2a71e24f41b428e5d460f77ea Sylvain BERTRAND 2021-09-19 14:15:14
gfx stack update (llvm still breaking mesa radv) e3b48d099fc6a6b3bb941ebfdf60d2f38772e2a0 Sylvain BERTRAND 2021-09-12 17:22:25
gfx stack update 2797dd892077e35ddc9da5ca59a59277aece4b52 Sylvain BERTRAND 2021-09-05 16:16:26
gfx stack update 7ed97850fd35bde754ba7f0c503c9e5599021e98 Sylvain BERTRAND 2021-08-29 17:52:47
gfx stack update 755ae2cc8a574d6446a63c2d3264e86fe740ec34 Sylvain BERTRAND 2021-08-22 21:15:03
Commit b98d369ceb00428c3f5cf4747731676e6da60bfc - steelseries rival3
Author: Sylvain BERTRAND
Author date (UTC): 2021-11-08 21:49
Committer name: Sylvain BERTRAND
Committer date (UTC): 2021-11-08 21:49
Parent(s): 68b23aba2c97f765428a34996b903b422462d927
Signer:
Signing key:
Signing status: N
Tree: de5a9b9e73999af3906a65cccb8c707f09ded793
File Lines added Lines deleted
files/rival3 185 0
File files/rival3 added (mode: 100755) (index 0000000..ada70b9)
1 #!/bin/sh
2 effects='rainbow-shift|breath-fast|breath|breath-slow|steady|rainbow-breath|disco'
3 effect_to_hex()
4 {
5 case $effect in
6 rainbow-shift) effect=00;;
7 breath-fast) effect=01;;
8 breath) effect=02;;
9 breath-slow) effect=03;;
10 steady) effect=04;;
11 rainbow-breath) effect=05;;
12 disco) effect=06;;
13 *)
14 printf "\nERROR:invalid effect ($effects)\n"
15 exit 1
16 ;;
17 esac
18 }
19
20 # not implemented, because factory default value is ok
21 # set polling rate in Hz:
22 # command=04 00
23 # suffix=00 00 00 00 00 00
24 # values=
25 # 125 Hz=04
26 # 250 Hz=03
27 # 500 Hz=02
28 # 1000 Hz=01 (factory default)
29 USAGE="Usage: $0 -z1 color(hex 3 bytes rrggbb) -z2 color(hex 3 bytes rrggbb) -z3 color(hex 3 bytes rrggbb) -logo color(hex 3 bytes rrggbb) -s dpi1,dpi2,dpi3,dpi4,dpi5(40-8500/40 increment) -e effect($effects) -save"
30 if test $# -eq 0; then
31 echo $USAGE
32 exit 0
33 fi
34
35 # vendor_id=0x1038
36 # product_id=0x1824
37 # product_id=0x182c, firmware v0.37.0.0
38 # endpoint index 3 (there are 4 endpoints)
39 endpoint=0
40 for l in /sys/class/hidraw/*; do
41 if readlink -f $l | egrep '1038:1824' >/dev/null 2>&1; then
42 if test $endpoint -eq 3; then
43 rival3=/dev/$(basename $l)
44 break
45 fi
46 endpoint=$(($endpoint + 1))
47 elif readlink -f $l | egrep -i '1038:182c' >/dev/null 2>&1; then
48 if test $endpoint -eq 3; then
49 rival3=/dev/$(basename $l)
50 break
51 fi
52 endpoint=$(($endpoint + 1))
53 fi
54 done
55
56 if test "${rival3-unset}" = unset; then
57 echo ERROR:unable to locate a rival3
58 exit 1
59 else
60 echo $rival3
61 fi
62
63 while test $# -ne 0; do
64 case $1 in
65 -z1)
66 if test "$2" = ""; then
67 echo missing rgb_hex
68 exit 1
69 fi
70 rgb_hex_z1=$2
71 shift 2
72 ;;
73 -z2)
74 if test "$2" = ""; then
75 echo missing rgb_hex
76 exit 1
77 fi
78 rgb_hex_z2=$2
79 shift 2
80 ;;
81 -z3)
82 if test "$2" = ""; then
83 echo missing rgb_hex
84 exit 1
85 fi
86 rgb_hex_z3=$2
87 shift 2
88 ;;
89 -logo)
90 if test "$2" = ""; then
91 echo missing rgb_hex
92 exit 1
93 fi
94 rgb_hex_logo=$2
95 shift 2
96 ;;
97 -s)
98 if test "$2" = ""; then
99 echo missing sensitivities
100 exit 1
101 fi
102 sensitivities=$2
103 shift 2
104 ;;
105 -e)
106 if test "$2" = ""; then
107 echo missing effect
108 exit 1
109 fi
110 effect=$2
111 shift 2
112 ;;
113 -save)
114 save=yes
115 shift
116 ;;
117 *)
118 echo ignoring $1
119 shift
120 ;;
121 esac
122 done
123
124 # each command is padded to 9 bytes
125 if test "${rgb_hex_z1-unset}" != unset; then
126 echo "rgb_hex_z1=$rgb_hex_z1";
127 cmd_hex=050001${rgb_hex_z1}64
128 fi
129 if test "${rgb_hex_z2-unset}" != unset; then
130 echo "rgb_hex_z2=$rgb_hex_z2";
131 cmd_hex=050002${rgb_hex_z2}64
132 fi
133 if test "${rgb_hex_z3-unset}" != unset; then
134 echo "rgb_hex_z3=$rgb_hex_z3";
135 cmd_hex=050003${rgb_hex_z3}64
136 fi
137 if test "${rgb_hex_logo-unset}" != unset; then
138 echo "rgb_hex_logo=$rgb_hex_logo";
139 cmd_hex=0500004${rgb_hex_logo}64
140 fi
141 if test "${sensitivities-unset}" != unset; then
142 printf "sensitivities = $sensitivities"
143 IFS_SAVED="$IFS"
144 IFS=','
145 dpi_n=0
146 sensitivities_rounded="/rounded_to ="
147 for dpi in $sensitivities
148 do
149 dpi_step=$(printf "$dpi/40" | bc)
150 dpi_rounded=$(printf "$dpi_step * 40" | bc)
151 sensitivities_rounded="${sensitivities_rounded} ${dpi_rounded}"
152 if test $dpi_rounded -lt 40; then
153 printf "\n$dpi_rounded from $dpi is below 40\n"
154 exit
155 fi
156 if test $dpi_rounded -gt 8500; then
157 printf "\n$dpi_rounded from $dpi is above 8500\n"
158 exit
159 fi
160 output=$(($dpi_step - 1))
161 output_hex=$(printf "%02x" $output)
162 sensitivities_hex="${sensitivities_hex}$output_hex"
163 dpi_n=$(printf "%02x" $(($dpi_n + 1)))
164 done
165 IFS="$IFS_SAVED"
166 printf "$sensitivities_rounded"
167 if test $dpi_n -gt 5; then
168 printf "\ndpi preset count is above 5\n"
169 exit
170 fi
171 echo "/hexcode = ${dpi_n}${sensitivities_hex}"
172 cmd_hex=${cmd_hex}0b00${dpi_n}01${sensitivities_hex}
173 fi
174 if test "${effect-unset}" != unset; then
175 printf "effect=$effect"
176 effect_to_hex
177 echo "/hexcode=$effect"
178 cmd_hex=${cmd_hex}0600${effect}
179 fi
180 # must be last for an obvious reason
181 if test "${save-unset}" != unset; then
182 echo "****will save settings in mouse persistent memory****"
183 cmd_hex=${cmd_hex}0900
184 fi
185 printf "00:$cmd_hex\n" | xxd -r >$rival3
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/sylware/nyanlinux

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/sylware/nyanlinux

Clone this repository using git:
git clone git://git.rocketgit.com/user/sylware/nyanlinux

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main