Skip to content

Commit 0c064c5

Browse files
committed
other: add v1 schema
1 parent b666061 commit 0c064c5

File tree

1 file changed

+385
-0
lines changed

1 file changed

+385
-0
lines changed

schema/v1/bottom.json

Lines changed: 385 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,385 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://github.com/ClementTsang/bottom/tree/main/schema/nightly/schema.json",
4+
"$comment": "https://clementtsang.github.io/bottom/nightly/configuration/config-file",
5+
"title": "Schema for bottom's configs (nightly)",
6+
"type": "object",
7+
"definitions": {
8+
"row": {
9+
"items": {
10+
"properties": {
11+
"ratio": {
12+
"default": 1,
13+
"type": "integer"
14+
},
15+
"type": {
16+
"enum": ["cpu", "mem", "proc", "net", "temp", "disk", "empty"],
17+
"type": "string"
18+
},
19+
"default": {
20+
"default": true,
21+
"type": "boolean"
22+
}
23+
},
24+
"patternProperties": {
25+
"row(.child)+": {
26+
"$ref": "#/definitions/row"
27+
}
28+
},
29+
"type": "object"
30+
},
31+
"type": "array"
32+
},
33+
"filter": {
34+
"description": "hide specific temperature sensors, network interfaces, and disks using filters",
35+
"properties": {
36+
"is_list_ignored": {
37+
"default": true,
38+
"type": "boolean"
39+
},
40+
"list": {
41+
"type": "array"
42+
},
43+
"regex": {
44+
"default": true,
45+
"type": "boolean"
46+
},
47+
"case_sensitive": {
48+
"default": false,
49+
"type": "boolean"
50+
},
51+
"whole_word": {
52+
"default": false,
53+
"type": "boolean"
54+
}
55+
},
56+
"type": "object"
57+
}
58+
},
59+
"properties": {
60+
"flags": {
61+
"description": "This group of options represents a command-line flag/option. Flags explicitly added when running (ie: btm -a) will override this config file if an option is also set here",
62+
"properties": {
63+
"hide_avg_cpu": {
64+
"default": false,
65+
"description": "Whether to hide the average cpu entry",
66+
"type": "boolean"
67+
},
68+
"dot_marker": {
69+
"default": false,
70+
"description": "Whether to use dot markers rather than braille",
71+
"type": "boolean"
72+
},
73+
"rate": {
74+
"default": 1000,
75+
"description": "The update rate of the application",
76+
"type": "integer"
77+
},
78+
"left_legend": {
79+
"default": false,
80+
"description": "Whether to put the CPU legend to the left",
81+
"type": "boolean"
82+
},
83+
"current_usage": {
84+
"default": false,
85+
"description": "Whether to set CPU% on a process to be based on the total CPU or just current usage",
86+
"type": "boolean"
87+
},
88+
"unnormalized_cpu": {
89+
"default": false,
90+
"description": "Whether to set CPU% on a process to be based on the total CPU or per-core CPU% (not divided by the number of cpus)",
91+
"type": "boolean"
92+
},
93+
"group_processes": {
94+
"default": false,
95+
"description": "Whether to group processes with the same name together by default",
96+
"type": "boolean"
97+
},
98+
"case_sensitive": {
99+
"default": false,
100+
"description": "Whether to make process searching case sensitive by default",
101+
"type": "boolean"
102+
},
103+
"whole_word": {
104+
"default": false,
105+
"description": "Whether to make process searching look for matching the entire word by default",
106+
"type": "boolean"
107+
},
108+
"regex": {
109+
"default": false,
110+
"description": "Whether to make process searching use regex by default",
111+
"type": "boolean"
112+
},
113+
"temperature_type": {
114+
"default": "k",
115+
"enum": ["k", "f", "c", "kelvin", "fahrenheit", "celsius"],
116+
"description": "Defaults to Celsius",
117+
"type": "string"
118+
},
119+
"default_time_value": {
120+
"default": 60000,
121+
"description": "The default time interval in milliseconds",
122+
"type": "integer"
123+
},
124+
"time_delta": {
125+
"default": 15000,
126+
"description": "The time delta on each zoom in/out action in milliseconds",
127+
"type": "integer"
128+
},
129+
"hide_time": {
130+
"default": false,
131+
"description": "Hides the time scale",
132+
"type": "boolean"
133+
},
134+
"default_widget_type": {
135+
"default": "proc",
136+
"description": "Override layout default widget",
137+
"type": "string"
138+
},
139+
"default_widget_count": {
140+
"default": 1,
141+
"description": "Override layout default widget",
142+
"type": "integer"
143+
},
144+
"expanded_on_startup": {
145+
"default": true,
146+
"description": "Expand selected widget upon starting the app",
147+
"type": "boolean"
148+
},
149+
"basic": {
150+
"default": false,
151+
"description": "Use basic mode",
152+
"type": "boolean"
153+
},
154+
"use_old_network_legend": {
155+
"default": false,
156+
"description": "Use the old network legend style",
157+
"type": "boolean"
158+
},
159+
"hide_table_gap": {
160+
"default": false,
161+
"description": "Remove space in tables",
162+
"type": "boolean"
163+
},
164+
"battery": {
165+
"default": false,
166+
"description": "Show the battery widgets",
167+
"type": "boolean"
168+
},
169+
"disable_click": {
170+
"default": false,
171+
"description": "Disable mouse clicks",
172+
"type": "boolean"
173+
},
174+
"color": {
175+
"default": "default",
176+
"enum": [
177+
"default",
178+
"default-light",
179+
"gruvbox",
180+
"gruvbox-light",
181+
"nord",
182+
"nord-light"
183+
],
184+
"description": "Built-in themes",
185+
"type": "string"
186+
},
187+
"mem_as_value": {
188+
"default": false,
189+
"description": "Show memory values in the processes widget as values by default",
190+
"type": "boolean"
191+
},
192+
"tree": {
193+
"default": false,
194+
"description": "Show tree mode by default in the processes widget",
195+
"type": "boolean"
196+
},
197+
"show_table_scroll_position": {
198+
"default": false,
199+
"description": "Shows an indicator in table widgets tracking where in the list you are",
200+
"type": "boolean"
201+
},
202+
"process_command": {
203+
"default": false,
204+
"description": "Show processes as their commands by default in the process widget",
205+
"type": "boolean"
206+
},
207+
"network_use_binary_prefix": {
208+
"default": false,
209+
"description": "Displays the network widget with binary prefixes",
210+
"type": "boolean"
211+
},
212+
"network_use_bytes": {
213+
"default": false,
214+
"description": "Displays the network widget using bytes",
215+
"type": "boolean"
216+
},
217+
"network_use_log": {
218+
"default": false,
219+
"description": "Displays the network widget with a log scale",
220+
"type": "boolean"
221+
},
222+
"disable_advanced_kill": {
223+
"default": false,
224+
"description": "Hides advanced options to stop a process on Unix-like systems",
225+
"type": "boolean"
226+
},
227+
"enable_gpu_memory": {
228+
"default": false,
229+
"description": "Shows GPU(s) memory",
230+
"type": "boolean"
231+
},
232+
"retention": {
233+
"default": "10m",
234+
"description": "How much data is stored at once in terms of time",
235+
"type": "string"
236+
}
237+
},
238+
"type": "object"
239+
},
240+
"colors": {
241+
"description": "These are all the components that support custom theming. Note that colour support will depend on terminal support",
242+
"properties": {
243+
"table_header_color": {
244+
"default": "LightBlue",
245+
"description": "Represents the colour of table headers (processes, CPU, disks, temperature)",
246+
"type": "string"
247+
},
248+
"widget_title_color": {
249+
"default": "Gray",
250+
"description": "Represents the colour of the label each widget has",
251+
"type": "string"
252+
},
253+
"avg_cpu_color": {
254+
"default": "Red",
255+
"description": "Represents the average CPU color",
256+
"type": "string"
257+
},
258+
"cpu_core_colors": {
259+
"items": {
260+
"uniqueItems": true,
261+
"minItems": 1,
262+
"type": "string"
263+
},
264+
"default": [
265+
"LightMagenta",
266+
"LightYellow",
267+
"LightCyan",
268+
"LightGreen",
269+
"LightBlue",
270+
"LightRed",
271+
"Cyan",
272+
"Green",
273+
"Blue",
274+
"Red"
275+
],
276+
"description": "Represents the colour the core will use in the CPU legend and graph",
277+
"type": "array"
278+
},
279+
"ram_color": {
280+
"default": "LightMagenta",
281+
"description": "Represents the colour RAM will use in the memory legend and graph",
282+
"type": "string"
283+
},
284+
"swap_color": {
285+
"default": "LightYellow",
286+
"description": "Represents the colour SWAP will use in the memory legend and graph",
287+
"type": "string"
288+
},
289+
"arc_color": {
290+
"default": "LightCyan",
291+
"description": "Represents the colour ARC will use in the memory legend and graph",
292+
"type": "string"
293+
},
294+
"gpu_core_colors": {
295+
"items": {
296+
"uniqueItems": true,
297+
"minItems": 1,
298+
"type": "string"
299+
},
300+
"default": [
301+
"LightGreen",
302+
"LightBlue",
303+
"LightRed",
304+
"Cyan",
305+
"Green",
306+
"Blue",
307+
"Red"
308+
],
309+
"description": "Represents the colour the GPU will use in the memory legend and graph",
310+
"type": "array"
311+
},
312+
"rx_color": {
313+
"default": "LightCyan",
314+
"description": "Represents the colour rx will use in the network legend and graph",
315+
"type": "string"
316+
},
317+
"tx_color": {
318+
"default": "LightGreen",
319+
"description": "Represents the colour tx will use in the network legend and graph",
320+
"type": "string"
321+
},
322+
"border_color": {
323+
"default": "Gray",
324+
"description": "Represents the colour of the border of unselected widgets",
325+
"type": "string"
326+
},
327+
"highlighted_border_color": {
328+
"default": "LightBlue",
329+
"description": "Represents the colour of the border of selected widgets",
330+
"type": "string"
331+
},
332+
"text_color": {
333+
"default": "Gray",
334+
"description": "Represents the colour of most text",
335+
"type": "string"
336+
},
337+
"selected_text_color": {
338+
"default": "Black",
339+
"description": "Represents the colour of text that is selected",
340+
"type": "string"
341+
},
342+
"selected_bg_color": {
343+
"default": "LightBlue",
344+
"description": "Represents the background colour of text that is selected",
345+
"type": "string"
346+
},
347+
"graph_color": {
348+
"default": "Gray",
349+
"description": "Represents the colour of the lines and text of the graph",
350+
"type": "string"
351+
},
352+
"high_battery_color": {
353+
"default": "green",
354+
"description": "Represents the colours of the battery based on charge",
355+
"type": "string"
356+
},
357+
"medium_battery_color": {
358+
"default": "yellow",
359+
"description": "Represents the colours of the battery based on charge",
360+
"type": "string"
361+
},
362+
"low_battery_color": {
363+
"default": "red",
364+
"description": "Represents the colours of the battery based on charge",
365+
"type": "string"
366+
}
367+
}
368+
},
369+
"row": {
370+
"$ref": "#/definitions/row"
371+
},
372+
"disk_filter": {
373+
"$ref": "#/definitions/filter"
374+
},
375+
"mount_filter": {
376+
"$ref": "#/definitions/filter"
377+
},
378+
"temp_filter": {
379+
"$ref": "#/definitions/filter"
380+
},
381+
"net_filter": {
382+
"$ref": "#/definitions/filter"
383+
}
384+
}
385+
}

0 commit comments

Comments
 (0)