tui-config-schema.json 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema#",
  3. "description": "The JSON schema for the Terminal.Gui Configuration Manager (https://gui-cs.github.io/Terminal.Gui/schemas/tui-config-schema.json).",
  4. "type": "object",
  5. "properties": {
  6. "Application.HeightAsBuffer": {
  7. "description": "See HeightAsBuffer API documentation.",
  8. "type": "boolean"
  9. },
  10. "Application.AlternateForwardKey": {
  11. "description": "Alternative key for navigating forwards through views. SCtrl+Tab is the primary key.",
  12. "$ref": "#/definitions/Key"
  13. },
  14. "Application.AlternateBackwardKey": {
  15. "description": "Alternative key for navigating backwards through views. Shift+Ctrl+Tab is the primary key.",
  16. "$ref": "#/definitions/Key"
  17. },
  18. "Application.QuitKey": {
  19. "description": "The key to quit the application. Ctrl+Q is the default.",
  20. "$ref": "#/definitions/Key"
  21. },
  22. "Application.IsMouseDisabled": {
  23. "description": "Disable or enable the mouse. The mouse is enabled by default.",
  24. "type": "boolean"
  25. },
  26. "Application.UseSystemConsole": {
  27. "description": "If true, forces the use of the System.Console-based (aka NetDriver) driver. The default is false.",
  28. "type": "boolean"
  29. },
  30. "Theme": {
  31. "description": "The currently selected theme. The default is 'Default'.",
  32. "type": "string"
  33. },
  34. "Themes": {
  35. "description": "An array of Theme objects. Each Theme specifies a set of settings for an application. Set Theme to the name of the active theme.",
  36. "type": "array",
  37. "properties": {
  38. "Themes": {
  39. "$ref": "#/definitions/Theme"
  40. }
  41. },
  42. "additionalProperties": {
  43. "$ref": "#/definitions/ColorScheme"
  44. }
  45. }
  46. },
  47. "definitions": {
  48. "Theme": {
  49. "description": "A Theme is a collection of settings that are named.",
  50. "type": "object",
  51. "properties": {
  52. "ColorSchemes": {
  53. "description": "The ColorSchemes defined for this Theme.",
  54. "$ref": "#/definitions/ColorSchemes"
  55. }
  56. }
  57. },
  58. "ColorSchemes": {
  59. "description": "A list of ColorSchemes. Each ColorScheme specifies a set of Attributes (Foreground & Background).",
  60. "type": "array",
  61. "properties": {
  62. "TopLevel": {
  63. "$ref": "#/definitions/ColorScheme"
  64. },
  65. "Base": {
  66. "$ref": "#/definitions/ColorScheme"
  67. },
  68. "Dialog": {
  69. "$ref": "#/definitions/ColorScheme"
  70. },
  71. "Menu": {
  72. "$ref": "#/definitions/ColorScheme"
  73. },
  74. "Error": {
  75. "$ref": "#/definitions/ColorScheme"
  76. }
  77. },
  78. "additionalProperties": {
  79. "$ref": "#/definitions/ColorScheme"
  80. }
  81. },
  82. "ColorScheme": {
  83. "description": "A Terminal.Gui ColorScheme. Specifies the Foreground & Background colors for modes of an Terminal.Gui app.",
  84. "type": "object",
  85. "properties": {
  86. "Normal": {
  87. "description": "The foreground and background color for text when the view is not focused, hot, or disabled.",
  88. "$ref": "#/definitions/Attribute"
  89. },
  90. "Focus": {
  91. "description": "The foreground and background color for text when the view has focus.",
  92. "$ref": "#/definitions/Attribute"
  93. },
  94. "HotNormal": {
  95. "description": "The foreground and background color for text when the view is highlighted (hot).",
  96. "$ref": "#/definitions/Attribute"
  97. },
  98. "HotFocus": {
  99. "description": "The foreground and background color for text when the view is highlighted (hot) and has focus.",
  100. "$ref": "#/definitions/Attribute"
  101. },
  102. "Disabled": {
  103. "description": "The foreground and background color for text when the view disabled.",
  104. "$ref": "#/definitions/Attribute"
  105. }
  106. }
  107. },
  108. "Attribute": {
  109. "description": "A Terminal.Gui color attribute. Specifies the Foreground & Background colors for Terminal.Gui output.",
  110. "type": "object",
  111. "properties": {
  112. "Foreground": {
  113. "$ref": "#/definitions/Color"
  114. },
  115. "Background": {
  116. "$ref": "#/definitions/Color"
  117. }
  118. },
  119. "required": [
  120. "Foreground",
  121. "Background"
  122. ]
  123. },
  124. "Color": {
  125. "description": "One be either one of 16 standard color names or an rgb(r,g,b) tuple.",
  126. "$schema": "http://json-schema.org/draft-07/schema#",
  127. "type": "string",
  128. "properties": {
  129. "color": {
  130. "oneOf": [
  131. {
  132. "type": "string",
  133. "enum": [
  134. "Black",
  135. "Blue",
  136. "Green",
  137. "Cyan",
  138. "Red",
  139. "Magenta",
  140. "Brown",
  141. "Gray",
  142. "DarkGray",
  143. "BrightBlue",
  144. "BrightGreen",
  145. "BrightCyan",
  146. "BrightRed",
  147. "BrightMagenta",
  148. "BrightYellow",
  149. "White"
  150. ]
  151. },
  152. {
  153. "type": "string",
  154. "pattern": "^rgb\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*\\)$"
  155. }
  156. ]
  157. }
  158. }
  159. },
  160. "Key": {
  161. "description": "A key pressed on the keyboard.",
  162. "type": "object",
  163. "properties": {
  164. "Key": {
  165. "description": "A key name (e.g. A, b, 1, 2, Enter, Esc, F5, etc.) or an integer value (e.g. 65, 66, 67, etc.).",
  166. "oneOf": [
  167. {
  168. "type": "string",
  169. "enum": [
  170. "Null",
  171. "Backspace",
  172. "Tab",
  173. "Enter",
  174. "Clear",
  175. "Esc",
  176. "Space",
  177. "D0",
  178. "D1",
  179. "D2",
  180. "D3",
  181. "D4",
  182. "D5",
  183. "D6",
  184. "D7",
  185. "D8",
  186. "D9",
  187. "0",
  188. "1",
  189. "2",
  190. "3",
  191. "4",
  192. "5",
  193. "6",
  194. "7",
  195. "8",
  196. "9",
  197. "a",
  198. "b",
  199. "c",
  200. "d",
  201. "e",
  202. "f",
  203. "g",
  204. "h",
  205. "i",
  206. "j",
  207. "k",
  208. "l",
  209. "m",
  210. "n",
  211. "o",
  212. "p",
  213. "q",
  214. "r",
  215. "s",
  216. "t",
  217. "u",
  218. "v",
  219. "w",
  220. "x",
  221. "y",
  222. "z",
  223. "A",
  224. "B",
  225. "C",
  226. "D",
  227. "E",
  228. "F",
  229. "G",
  230. "H",
  231. "I",
  232. "J",
  233. "K",
  234. "L",
  235. "M",
  236. "N",
  237. "O",
  238. "P",
  239. "Q",
  240. "R",
  241. "S",
  242. "T",
  243. "U",
  244. "V",
  245. "W",
  246. "X",
  247. "Y",
  248. "Z",
  249. "F1",
  250. "F2",
  251. "F3",
  252. "F4",
  253. "F5",
  254. "F6",
  255. "F7",
  256. "F8",
  257. "F9",
  258. "F10",
  259. "F11",
  260. "F12",
  261. "Insert",
  262. "Delete",
  263. "Home",
  264. "End",
  265. "PageUp",
  266. "PageDown",
  267. "Up",
  268. "Down",
  269. "Left",
  270. "Right"
  271. ]
  272. },
  273. {
  274. "type": "integer"
  275. }
  276. ]
  277. },
  278. "Modifiers": {
  279. "description": "A keyboard modifier (e.g. Ctrl, Alt, or Shift).",
  280. "type": "array",
  281. "items": {
  282. "type": "string",
  283. "enum": [
  284. "Ctrl",
  285. "Alt",
  286. "Shift"
  287. ]
  288. }
  289. }
  290. },
  291. "required": [
  292. "Key"
  293. ]
  294. }
  295. }
  296. }