forked from caksoylar/zmk-rgbled-widget
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathKconfig
More file actions
273 lines (215 loc) · 6.48 KB
/
Kconfig
File metadata and controls
273 lines (215 loc) · 6.48 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
# Color definitions to use with color settings
COLOR_RESET := -1
COLOR_BLACK := 0
COLOR_RED := 1
COLOR_GREEN := 2
COLOR_YELLOW := 3
COLOR_BLUE := 4
COLOR_MAGENTA := 5
COLOR_CYAN := 6
COLOR_WHITE := 7
config SMART_RGBLED_WIDGET
bool "Enable smart RGB LED widget for showing battery and output status"
if SMART_RGBLED_WIDGET
config LED
default y
config RGBLED_WIDGET_INTERVAL_MS
int "Minimum wait duration between two blinks in ms"
default 500
# Battery level settings
config RGBLED_WIDGET_BATTERY_BLINK_MS
int "Duration of battery level blink in ms"
default 2000
config RGBLED_WIDGET_BATTERY_LEVEL_HIGH
int "High battery level percentage"
default 80
config RGBLED_WIDGET_BATTERY_LEVEL_LOW
int "Low battery level percentage"
default 20
config RGBLED_WIDGET_BATTERY_LEVEL_CRITICAL
int "Critical battery level percentage"
default 5
config RGBLED_WIDGET_BATTERY_COLOR_HIGH
int "Color for high battery level (above LEVEL_HIGH)"
range 0 7
default $(COLOR_GREEN)
config RGBLED_WIDGET_BATTERY_COLOR_MEDIUM
int "Color for medium battery level (between LEVEL_LOW and LEVEL_HIGH)"
range 0 7
default $(COLOR_YELLOW)
config RGBLED_WIDGET_BATTERY_COLOR_LOW
int "Color for low battery level (below LEVEL_LOW)"
range 0 7
default $(COLOR_RED)
config RGBLED_WIDGET_BATTERY_COLOR_CRITICAL
int "Color for critical battery level (below LEVEL_CRITICAL)"
range 0 7
default $(COLOR_RED)
# Connectivity indicator settings
config RGBLED_WIDGET_CONN_BLINK_MS
int "Duration of BLE connection status blink in ms"
default RGBLED_WIDGET_OUTPUT_BLINK_MS
config RGBLED_WIDGET_OUTPUT_BLINK_MS # DEPRECATED, do not use
int
default 1000
config RGBLED_WIDGET_CONN_COLOR_CONNECTED
int "Color for connected BLE connection status"
range 0 7
default $(COLOR_BLUE)
config RGBLED_WIDGET_CONN_COLOR_ADVERTISING
int "Color for advertising BLE connection status"
range 0 7
default $(COLOR_YELLOW)
config RGBLED_WIDGET_CONN_COLOR_DISCONNECTED
int "Color for disconnected BLE connection status"
range 0 7
default $(COLOR_RED)
# Layer indicator settings
config RGBLED_WIDGET_SHOW_LAYER_CHANGE
bool "Indicate highest active layer on each layer change with a sequence of blinks"
config RGBLED_WIDGET_LAYER_BLINK_MS
int "Blink and wait duration for layer indicator"
default 100
config RGBLED_WIDGET_LAYER_COLOR
int "Color to use for layer indicator"
range 0 7
default $(COLOR_CYAN)
config RGBLED_WIDGET_LAYER_DEBOUNCE_MS
int "Wait duration after a layer change before showing the highest active layer"
default 100
# Constant layer color settings
config RGBLED_WIDGET_SHOW_LAYER_COLORS
bool "Use custom colors for layers"
config RGBLED_WIDGET_LAYER_0_COLOR
int "Color to use for the base layer"
range -1 7
default $(COLOR_RESET)
config RGBLED_WIDGET_LAYER_1_COLOR
int "Color to use for layer 1"
range 0 7
default $(COLOR_RED)
config RGBLED_WIDGET_LAYER_2_COLOR
int "Color to use for layer 2"
range 0 7
default $(COLOR_GREEN)
config RGBLED_WIDGET_LAYER_3_COLOR
int "Color to use for layer 3"
range 0 7
default $(COLOR_YELLOW)
config RGBLED_WIDGET_LAYER_4_COLOR
int "Color to use for layer 4"
range 0 7
default $(COLOR_BLUE)
config RGBLED_WIDGET_LAYER_5_COLOR
int "Color to use for layer 5"
range 0 7
default $(COLOR_MAGENTA)
config RGBLED_WIDGET_LAYER_6_COLOR
int "Color to use for layer 6"
range 0 7
default $(COLOR_CYAN)
config RGBLED_WIDGET_LAYER_7_COLOR
int "Color to use for layer 7"
range 0 7
default $(COLOR_WHITE)
config RGBLED_WIDGET_LAYER_8_COLOR
int "Color to use for layer 8"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_9_COLOR
int "Color to use for layer 9"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_10_COLOR
int "Color to use for layer 10"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_11_COLOR
int "Color to use for layer 11"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_12_COLOR
int "Color to use for layer 12"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_13_COLOR
int "Color to use for layer 13"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_14_COLOR
int "Color to use for layer 14"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_15_COLOR
int "Color to use for layer 15"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_16_COLOR
int "Color to use for layer 16"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_17_COLOR
int "Color to use for layer 17"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_18_COLOR
int "Color to use for layer 18"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_19_COLOR
int "Color to use for layer 19"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_20_COLOR
int "Color to use for layer 20"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_21_COLOR
int "Color to use for layer 21"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_22_COLOR
int "Color to use for layer 22"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_23_COLOR
int "Color to use for layer 23"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_24_COLOR
int "Color to use for layer 24"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_25_COLOR
int "Color to use for layer 25"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_26_COLOR
int "Color to use for layer 26"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_27_COLOR
int "Color to use for layer 27"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_28_COLOR
int "Color to use for layer 28"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_29_COLOR
int "Color to use for layer 29"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_30_COLOR
int "Color to use for layer 30"
range 0 7
default $(COLOR_BLACK)
config RGBLED_WIDGET_LAYER_31_COLOR
int "Color to use for layer 31"
range 0 7
default $(COLOR_BLACK)
endif # RGBLED_WIDGET
DT_COMPAT_ZMK_BEHAVIOR_RGBLED_WIDGET := zmk,behavior-rgbled-widget
config ZMK_BEHAVIOR_RGBLED_WIDGET
bool
default $(dt_compat_enabled,$(DT_COMPAT_ZMK_BEHAVIOR_RGBLED_WIDGET))