forked from gui-cs/Terminal.Gui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtui-config-schema.json
More file actions
632 lines (632 loc) · 21.1 KB
/
tui-config-schema.json
File metadata and controls
632 lines (632 loc) · 21.1 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
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Terminal.Gui Configuration",
"description": "Configuration settings for Terminal.Gui applications. This schema defines settings for the application behavior, appearance, themes, key bindings, and component-specific options.",
"type": "object",
"properties": {
"$schema": {
"type": "string",
"format": "uri",
"description": "The URI of the schema that this configuration file adheres to. Optional but recommended for validation."
},
"ConfigurationManager.ThrowOnJsonErrors": {
"type": "boolean",
"default": false,
"description": "If true, JSON parsing errors encountered during configuration loading will throw exceptions. If false, errors are typically logged, and default values may be used."
},
"Key.Separator": {
"type": "string",
"default": "+",
"description": "The character used to separate modifiers and keys in key string representations (e.g., 'Ctrl+Q')."
},
"Application.ArrangeKey": {
"type": "string",
"default": "Ctrl+F5",
"description": "The key combination used to trigger an arrange or layout command, often for tiling or re-organizing windows."
},
"Application.Force16Colors": {
"type": "boolean",
"default": false,
"description": "If true, forces the console driver to output only the basic 16 ANSI colors, even if the terminal supports more (e.g., 256 colors or TrueColor)."
},
"Application.ForceDriver": {
"type": [
"string",
"null"
],
"enum": [
"",
"fake",
"ansi",
"curses",
"net",
"windows",
null
],
"default": "",
"description": "Forces the use of a specific console driver. If empty or null, Terminal.Gui will attempt to auto-detect the best driver. Options: 'fake', 'ansi', 'curses', 'net', 'windows'."
},
"Application.IsMouseDisabled": {
"type": "boolean",
"default": false,
"description": "Disables or enables mouse support for the application. If true, mouse events will be ignored."
},
"Application.NextTabGroupKey": {
"type": "string",
"default": "F6",
"description": "The key combination to navigate to the next logical group of controls or container (e.g., 'F6', 'Ctrl+PageDown')."
},
"Application.NextTabKey": {
"type": "string",
"default": "Tab",
"description": "The key combination to navigate to the next focusable view or tab stop (e.g., 'Tab')."
},
"Application.PrevTabGroupKey": {
"type": "string",
"default": "Shift+F6",
"description": "The key combination to navigate to the previous logical group of controls or container (e.g., 'Shift+F6', 'Ctrl+PageUp')."
},
"Application.PrevTabKey": {
"type": "string",
"default": "Shift+Tab",
"description": "The key combination to navigate to the previous focusable view or tab stop (e.g., 'Shift+Tab')."
},
"Application.QuitKey": {
"type": "string",
"default": "Esc",
"description": "The primary key combination used to request the application to quit (e.g., 'Esc', 'Ctrl+Q')."
},
"Application.AlternateForwardKey": {
"type": "string",
"description": "An alternative key combination for forward navigation or cycling through elements, often used in specific contexts (e.g., 'Ctrl+CursorRight')."
},
"Application.AlternateBackwardKey": {
"type": "string",
"description": "An alternative key combination for backward navigation or cycling through elements (e.g., 'Ctrl+CursorLeft')."
},
"Application.ShortCutKey": {
"type": "string",
"description": "The key used to activate shortcuts or hotkeys within views (e.g., 'AltMask', 'F9'). Typically used for menu shortcuts."
},
"PopoverMenu.DefaultKey": {
"type": "string",
"default": "Shift+F10",
"description": "Default key to open the context menu (PopoverMenu)."
},
"FileDialog.MaxSearchResults": {
"type": "integer",
"default": 10000,
"description": "Maximum number of search results to display in the FileDialog."
},
"FileDialogStyle.DefaultUseColors": {
"type": "boolean",
"default": false,
"description": "Whether the FileDialog should use colors by default to differentiate file/directory types."
},
"FileDialogStyle.DefaultUseUnicodeCharacters": {
"type": "boolean",
"default": false,
"description": "Whether the FileDialog should use Unicode characters for icons by default."
},
"Colors16": {
"type": "object",
"description": "Defines the 3-byte/6-character hexadecimal string values for the 16 legacy ANSI color names (ColorName16). These definitions can be overridden by the user to customize the base 16 color palette.",
"properties": {
"Black": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$",
"description": "Hex string for ColorName16.Black (typically #000000)."
},
"Blue": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$",
"description": "Hex string for ColorName16.Blue (typically #000080, a dark blue like Navy)."
},
"Green": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$",
"description": "Hex string for ColorName16.Green (typically #008000, a dark green)."
},
"Cyan": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$",
"description": "Hex string for ColorName16.Cyan (typically #008080, a dark cyan like Teal)."
},
"Red": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$",
"description": "Hex string for ColorName16.Red (typically #800000, a dark red like Maroon)."
},
"Magenta": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$",
"description": "Hex string for ColorName16.Magenta (typically #800080, a dark magenta like Purple)."
},
"Yellow": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$",
"description": "Hex string for ColorName16.Yellow (typically #808000, a dark yellow like Olive)."
},
"Gray": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$",
"description": "Hex string for ColorName16.Gray (typically #C0C0C0, a light gray like Silver)."
},
"DarkGray": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$",
"description": "Hex string for ColorName16.DarkGray (typically #808080, a medium gray)."
},
"BrightBlue": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$",
"description": "Hex string for ColorName16.BrightBlue (typically #0000FF)."
},
"BrightGreen": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$",
"description": "Hex string for ColorName16.BrightGreen (typically #00FF00, like Lime)."
},
"BrightCyan": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$",
"description": "Hex string for ColorName16.BrightCyan (typically #00FFFF, like Aqua)."
},
"BrightRed": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$",
"description": "Hex string for ColorName16.BrightRed (typically #FF0000)."
},
"BrightMagenta": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$",
"description": "Hex string for ColorName16.BrightMagenta (typically #FF00FF, like Fuchsia)."
},
"BrightYellow": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$",
"description": "Hex string for ColorName16.BrightYellow (typically #FFFF00)."
},
"White": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$",
"description": "Hex string for ColorName16.White (typically #FFFFFF)."
}
},
"additionalProperties": false
},
"Theme": {
"type": "string",
"default": "Default",
"description": "The name of the theme to be applied at application startup. This name must match one of the theme names defined in the 'Themes' array."
},
"Themes": {
"type": "array",
"description": "A list of theme definitions. Each theme provides a distinct look and feel for the application.",
"items": {
"type": "object",
"description": "A single theme definition. The object should have exactly one property, where the key is the unique name of the theme (e.g., 'Default', 'Dark'), and the value contains the theme's settings.",
"maxProperties": 1,
"minProperties": 1,
"patternProperties": {
"^[\\w\\s&\\(\\)-]+$": {
"$ref": "#/definitions/themeSettings"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": true,
"definitions": {
"Color": {
"description": "One be either one of the W3C standard color names (parsed case-insensitively), a ColorName16 (e.g. 'BrightBlue', parsed case-insensitively), an rgb(r,g,b) tuple, or a hex color string in the format #RRGGBB.",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "string",
"oneOf": [
{
"type": "string",
"enum": [
"AliceBlue",
"AmberPhosphor",
"AntiqueWhite",
"Aqua",
"Aquamarine",
"Azure",
"Beige",
"Bisque",
"Black",
"BlanchedAlmond",
"Blue",
"BlueViolet",
"BrightBlue",
"BrightCyan",
"BrightGreen",
"BrightMagenta",
"BrightRed",
"BrightYellow",
"Brown",
"BurlyWood",
"CadetBlue",
"Charcoal",
"CornflowerBlue",
"Cornsilk",
"Crimson",
"Cyan",
"DarkBlue",
"DarkCyan",
"DarkGoldenrod",
"DarkGray",
"DarkGreen",
"DarkGrey",
"DarkKhaki",
"DarkMagenta",
"DarkOliveGreen",
"DarkOrange",
"DarkOrchid",
"DarkRed",
"DarkSalmon",
"DarkSeaGreen",
"DarkSlateBlue",
"DarkSlateGray",
"DarkSlateGrey",
"DarkTurquoise",
"DarkViolet",
"DeepPink",
"DeepSkyBlue",
"DimGray",
"DimGrey",
"DodgerBlue",
"Ebony",
"FireBrick",
"FloralWhite",
"FluorescentOrange",
"ForestGreen",
"Fuchsia",
"Gainsboro",
"GhostWhite",
"Gold",
"Goldenrod",
"Gray",
"Green",
"GreenPhosphor",
"GreenYellow",
"Grey",
"GuppieGreen",
"HoneyDew",
"HotPink",
"IndianRed",
"Indigo",
"Ivory",
"Jet",
"Khaki",
"Lavender",
"LavenderBlush",
"LawnGreen",
"LemonChiffon",
"LightBlue",
"LightCoral",
"LightCyan",
"LightGoldenrodYellow",
"LightGray",
"LightGreen",
"LightGrey",
"LightPink",
"LightSalmon",
"LightSeaGreen",
"LightSkyBlue",
"LightSlateGray",
"LightSlateGrey",
"LightSteelBlue",
"LightYellow",
"Lime",
"LimeGreen",
"Linen",
"Magenta",
"Maroon",
"MediumAquaMarine",
"MediumBlue",
"MediumOrchid",
"MediumPurple",
"MediumSeaGreen",
"MediumSlateBlue",
"MediumSpringGreen",
"MediumTurquoise",
"MediumVioletRed",
"MidnightBlue",
"MintCream",
"MistyRose",
"Moccasin",
"NavajoWhite",
"Navy",
"OldLace",
"Olive",
"OliveDrab",
"Onyx",
"Orange",
"OrangeRed",
"Orchid",
"OuterSpace",
"PaleGoldenRod",
"PaleGreen",
"PaleTurquoise",
"PaleVioletRed",
"PapayaWhip",
"PeachPuff",
"Peru",
"Pink",
"Plum",
"PowderBlue",
"Purple",
"RaisinBlack",
"RebeccaPurple",
"Red",
"RosyBrown",
"RoyalBlue",
"SaddleBrown",
"Salmon",
"SandyBrown",
"SeaGreen",
"SeaShell",
"Sienna",
"Silver",
"SkyBlue",
"SlateBlue",
"SlateGray",
"SlateGrey",
"Snow",
"SpringGreen",
"SteelBlue",
"Tan",
"Teal",
"Thistle",
"Tomato",
"Turquoise",
"Violet",
"Wheat",
"White",
"WhiteSmoke",
"Yellow",
"YellowGreen"
]
},
{
"type": "string",
"pattern": "^rgb\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*\\)$"
},
{
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$"
}
]
},
"attribute": {
"type": "object",
"description": "Defines the foreground color, background color, and style for a specific UI element state.",
"properties": {
"Foreground": {
"$ref": "#/definitions/Color"
},
"Background": {
"$ref": "#/definitions/Color"
},
"Style": {
"type": "string",
"default": "None",
"description": "Text style. Parsed case-insensitively by the application. Can be a single style or a comma-separated list of the following valid flags: None, Bold, Italic, Underline, Faint, Blink, Reverse, Strikethrough (e.g., 'Bold,Italic').",
"pattern": "^(None|Bold|Italic|Underline|Faint|Blink|Reverse|Strikethrough)(\\s*,\\s*(None|Bold|Italic|Underline|Faint|Blink|Reverse|Strikethrough))*$"
}
},
"required": [
"Foreground",
"Background"
],
"additionalProperties": false
},
"scheme": {
"type": "object",
"description": "A collection of attributes defining the appearance of UI elements in different states (normal, focused, etc.).",
"properties": {
"Normal": {
"$ref": "#/definitions/attribute",
"description": "Appearance in the normal, non-focused state."
},
"Focus": {
"$ref": "#/definitions/attribute",
"description": "Appearance when the element has input focus."
},
"HotNormal": {
"$ref": "#/definitions/attribute",
"description": "Appearance for a 'hot' element (e.g., mouse hover) that is not focused."
},
"HotFocus": {
"$ref": "#/definitions/attribute",
"description": "Appearance for a 'hot' element that also has input focus."
},
"Disabled": {
"$ref": "#/definitions/attribute",
"description": "Appearance when the element is disabled."
},
"Active": {
"$ref": "#/definitions/attribute",
"description": "Appearance when the element is active."
},
"HotActive": {
"$ref": "#/definitions/attribute",
"description": "Appearance for a 'hot' element that is also active."
},
"Highlight": {
"$ref": "#/definitions/attribute",
"description": "Appearance for a highlighted element."
},
"Editable": {
"$ref": "#/definitions/attribute",
"description": "Appearance for an editable element."
},
"ReadOnly": {
"$ref": "#/definitions/attribute",
"description": "Appearance for a read-only element."
}
},
"required": [
"Normal"
],
"additionalProperties": false
},
"themeSettings": {
"type": "object",
"description": "Contains all settings for a specific theme, including default styles for various UI elements, glyphs, and color schemes.",
"properties": {
"BasedOn": {
"type": "string",
"description": "The name of another theme that this theme inherits settings from. Settings in the current theme will override those from the base theme."
},
"Dialog.DefaultButtonAlignment": {
"type": "string",
"enum": [
"Start",
"End",
"Center",
"Fill"
],
"description": "Default horizontal alignment for buttons within Dialog views."
},
"Dialog.DefaultButtonAlignmentModes": {
"type": "string",
"enum": [
"None",
"AddSpaceBetweenItems",
"AddSpaceAroundItems"
],
"description": "Specifies how extra space is distributed between buttons in Dialog views when alignment is 'Start', 'End', or 'Center'."
},
"Dialog.DefaultBorderStyle": {
"type": "string",
"enum": [
"None",
"Single",
"Double",
"Heavy",
"Rounded"
],
"description": "Default border style for Dialog views."
},
"Dialog.DefaultShadow": {
"type": "string",
"enum": [
"None",
"Transparent",
"Opaque"
],
"description": "Default shadow style for Dialog views, rendered behind the dialog."
},
"FrameView.DefaultBorderStyle": {
"type": "string",
"enum": [
"None",
"Single",
"Double",
"Heavy",
"Rounded"
],
"description": "Default border style for FrameView controls."
},
"Window.DefaultBorderStyle": {
"type": "string",
"enum": [
"None",
"Single",
"Double",
"Heavy",
"Rounded"
],
"description": "Default border style for Window views."
},
"MessageBox.DefaultButtonAlignment": {
"type": "string",
"enum": [
"Start",
"End",
"Center",
"Fill"
],
"description": "Default horizontal alignment for buttons within MessageBox views."
},
"MessageBox.DefaultBorderStyle": {
"type": "string",
"enum": [
"None",
"Single",
"Double",
"Heavy",
"Rounded"
],
"description": "Default border style for MessageBox views."
},
"Button.DefaultShadow": {
"type": "string",
"enum": [
"None",
"Transparent",
"Opaque"
],
"description": "Default shadow style for Button controls, often used for 3D effect."
},
"Menuv2.DefaultBorderStyle": {
"type": "string",
"enum": [
"None",
"Single",
"Double",
"Heavy",
"Rounded"
],
"description": "Default border style for the newer Menuv2 control and its sub-menus."
},
"MenuBarv2.DefaultBorderStyle": {
"type": "string",
"enum": [
"None",
"Single",
"Double",
"Heavy",
"Rounded"
],
"description": "Default border style for the MenuBarv2 control."
},
"StatusBar.DefaultSeparatorLineStyle": {
"type": "string",
"enum": [
"None",
"Single",
"Double",
"Heavy"
],
"description": "Default style for separator lines in the StatusBar."
},
"Schemes": {
"type": "array",
"description": "A list of scheme definitions for this theme. Each item in the array is an object containing one or more named schemes (e.g., 'TopLevel', 'Base', 'Menu').",
"items": {
"type": "object",
"description": "An object where each key is a scheme name (e.g., 'Base', 'Error') and its value is the scheme definition.",
"patternProperties": {
"^[A-Za-z][A-Za-z0-9_]*$": {
"$ref": "#/definitions/scheme"
}
},
"additionalProperties": false,
"minProperties": 1
}
}
},
"patternProperties": {
"^Glyphs\\.[A-Za-z0-9]+$": {
"type": "string",
"description": "A specific glyph character used by the theme for drawing UI elements like borders, arrows, indicators, etc. (e.g., 'Glyphs.LeftArrow', 'Glyphs.HLine'). The string value is the character to be used."
}
},
"additionalProperties": true
}
}
}