| 1 | { |
| 2 | "$id": "https://github.com/ClementTsang/bottom/blob/main/schema/v0.12.0/bottom.json", |
| 3 | "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 4 | "title": "Schema for bottom's config file (v0.12.0)", |
| 5 | "description": "https://bottom.pages.dev/0.12.0/configuration/config-file/", |
| 6 | "type": "object", |
| 7 | "properties": { |
| 8 | "cpu": { |
| 9 | "anyOf": [ |
| 10 | { |
| 11 | "$ref": "#/$defs/CpuConfig" |
| 12 | }, |
| 13 | { |
| 14 | "type": "null" |
| 15 | } |
| 16 | ] |
| 17 | }, |
| 18 | "disk": { |
| 19 | "anyOf": [ |
| 20 | { |
| 21 | "$ref": "#/$defs/DiskConfig" |
| 22 | }, |
| 23 | { |
| 24 | "type": "null" |
| 25 | } |
| 26 | ] |
| 27 | }, |
| 28 | "flags": { |
| 29 | "anyOf": [ |
| 30 | { |
| 31 | "$ref": "#/$defs/GeneralConfig" |
| 32 | }, |
| 33 | { |
| 34 | "type": "null" |
| 35 | } |
| 36 | ] |
| 37 | }, |
| 38 | "network": { |
| 39 | "anyOf": [ |
| 40 | { |
| 41 | "$ref": "#/$defs/NetworkConfig" |
| 42 | }, |
| 43 | { |
| 44 | "type": "null" |
| 45 | } |
| 46 | ] |
| 47 | }, |
| 48 | "processes": { |
| 49 | "anyOf": [ |
| 50 | { |
| 51 | "$ref": "#/$defs/ProcessesConfig" |
| 52 | }, |
| 53 | { |
| 54 | "type": "null" |
| 55 | } |
| 56 | ] |
| 57 | }, |
| 58 | "row": { |
| 59 | "type": [ |
| 60 | "array", |
| 61 | "null" |
| 62 | ], |
| 63 | "items": { |
| 64 | "$ref": "#/$defs/row" |
| 65 | } |
| 66 | }, |
| 67 | "styles": { |
| 68 | "anyOf": [ |
| 69 | { |
| 70 | "$ref": "#/$defs/StyleConfig" |
| 71 | }, |
| 72 | { |
| 73 | "type": "null" |
| 74 | } |
| 75 | ] |
| 76 | }, |
| 77 | "temperature": { |
| 78 | "anyOf": [ |
| 79 | { |
| 80 | "$ref": "#/$defs/TempConfig" |
| 81 | }, |
| 82 | { |
| 83 | "type": "null" |
| 84 | } |
| 85 | ] |
| 86 | } |
| 87 | }, |
| 88 | "$defs": { |
| 89 | "BatteryStyle": { |
| 90 | "description": "Styling specific to the battery widget.", |
| 91 | "type": "object", |
| 92 | "properties": { |
| 93 | "high_battery_color": { |
| 94 | "description": "The colour of the battery widget bar when the battery is over 50%.", |
| 95 | "anyOf": [ |
| 96 | { |
| 97 | "$ref": "#/$defs/ColorStr" |
| 98 | }, |
| 99 | { |
| 100 | "type": "null" |
| 101 | } |
| 102 | ] |
| 103 | }, |
| 104 | "low_battery_color": { |
| 105 | "description": "The colour of the battery widget bar when the battery is under 10%.", |
| 106 | "anyOf": [ |
| 107 | { |
| 108 | "$ref": "#/$defs/ColorStr" |
| 109 | }, |
| 110 | { |
| 111 | "type": "null" |
| 112 | } |
| 113 | ] |
| 114 | }, |
| 115 | "medium_battery_color": { |
| 116 | "description": "The colour of the battery widget bar when the battery between 10% to 50%.", |
| 117 | "anyOf": [ |
| 118 | { |
| 119 | "$ref": "#/$defs/ColorStr" |
| 120 | }, |
| 121 | { |
| 122 | "type": "null" |
| 123 | } |
| 124 | ] |
| 125 | } |
| 126 | } |
| 127 | }, |
| 128 | "ColorStr": { |
| 129 | "type": "string" |
| 130 | }, |
| 131 | "CpuConfig": { |
| 132 | "description": "CPU column settings.", |
| 133 | "type": "object", |
| 134 | "properties": { |
| 135 | "default": { |
| 136 | "description": "The default selected entry of the CPU widget.", |
| 137 | "$ref": "#/$defs/CpuDefault" |
| 138 | } |
| 139 | } |
| 140 | }, |
| 141 | "CpuDefault": { |
| 142 | "description": "The default selected entry of the CPU widget.", |
| 143 | "type": "string", |
| 144 | "enum": [ |
| 145 | "all", |
| 146 | "average" |
| 147 | ] |
| 148 | }, |
| 149 | "CpuStyle": { |
| 150 | "description": "Styling specific to the CPU widget.", |
| 151 | "type": "object", |
| 152 | "properties": { |
| 153 | "all_entry_color": { |
| 154 | "description": "The colour of the \"All\" CPU label.", |
| 155 | "anyOf": [ |
| 156 | { |
| 157 | "$ref": "#/$defs/ColorStr" |
| 158 | }, |
| 159 | { |
| 160 | "type": "null" |
| 161 | } |
| 162 | ] |
| 163 | }, |
| 164 | "avg_entry_color": { |
| 165 | "description": "The colour of the average CPU label and graph line.", |
| 166 | "anyOf": [ |
| 167 | { |
| 168 | "$ref": "#/$defs/ColorStr" |
| 169 | }, |
| 170 | { |
| 171 | "type": "null" |
| 172 | } |
| 173 | ] |
| 174 | }, |
| 175 | "cpu_core_colors": { |
| 176 | "description": "Colour of each CPU threads' label and graph line. Read in order.", |
| 177 | "type": [ |
| 178 | "array", |
| 179 | "null" |
| 180 | ], |
| 181 | "items": { |
| 182 | "$ref": "#/$defs/ColorStr" |
| 183 | } |
| 184 | } |
| 185 | } |
| 186 | }, |
| 187 | "DiskColumn": { |
| 188 | "type": "string", |
| 189 | "enum": [ |
| 190 | "Disk", |
| 191 | "Free", |
| 192 | "Free%", |
| 193 | "Mount", |
| 194 | "R/s", |
| 195 | "Read", |
| 196 | "Rps", |
| 197 | "Total", |
| 198 | "Used", |
| 199 | "Used%", |
| 200 | "W/s", |
| 201 | "Wps", |
| 202 | "Write" |
| 203 | ] |
| 204 | }, |
| 205 | "DiskConfig": { |
| 206 | "description": "Disk configuration.", |
| 207 | "type": "object", |
| 208 | "properties": { |
| 209 | "columns": { |
| 210 | "description": "A list of disk widget columns.", |
| 211 | "type": [ |
| 212 | "array", |
| 213 | "null" |
| 214 | ], |
| 215 | "items": { |
| 216 | "$ref": "#/$defs/DiskColumn" |
| 217 | } |
| 218 | }, |
| 219 | "mount_filter": { |
| 220 | "description": "A filter over the mount names.", |
| 221 | "anyOf": [ |
| 222 | { |
| 223 | "$ref": "#/$defs/IgnoreList" |
| 224 | }, |
| 225 | { |
| 226 | "type": "null" |
| 227 | } |
| 228 | ] |
| 229 | }, |
| 230 | "name_filter": { |
| 231 | "description": "A filter over the disk names.", |
| 232 | "anyOf": [ |
| 233 | { |
| 234 | "$ref": "#/$defs/IgnoreList" |
| 235 | }, |
| 236 | { |
| 237 | "type": "null" |
| 238 | } |
| 239 | ] |
| 240 | } |
| 241 | } |
| 242 | }, |
| 243 | "FinalWidget": { |
| 244 | "description": "Represents a widget.", |
| 245 | "type": "object", |
| 246 | "properties": { |
| 247 | "default": { |
| 248 | "type": [ |
| 249 | "boolean", |
| 250 | "null" |
| 251 | ] |
| 252 | }, |
| 253 | "ratio": { |
| 254 | "type": [ |
| 255 | "integer", |
| 256 | "null" |
| 257 | ], |
| 258 | "format": "uint16", |
| 259 | "maximum": 65535, |
| 260 | "minimum": 0 |
| 261 | }, |
| 262 | "type": { |
| 263 | "type": "string" |
| 264 | } |
| 265 | }, |
| 266 | "required": [ |
| 267 | "type" |
| 268 | ] |
| 269 | }, |
| 270 | "GeneralConfig": { |
| 271 | "type": "object", |
| 272 | "properties": { |
| 273 | "autohide_time": { |
| 274 | "type": [ |
| 275 | "boolean", |
| 276 | "null" |
| 277 | ] |
| 278 | }, |
| 279 | "average_cpu_row": { |
| 280 | "type": [ |
| 281 | "boolean", |
| 282 | "null" |
| 283 | ] |
| 284 | }, |
| 285 | "basic": { |
| 286 | "type": [ |
| 287 | "boolean", |
| 288 | "null" |
| 289 | ] |
| 290 | }, |
| 291 | "battery": { |
| 292 | "type": [ |
| 293 | "boolean", |
| 294 | "null" |
| 295 | ] |
| 296 | }, |
| 297 | "case_sensitive": { |
| 298 | "type": [ |
| 299 | "boolean", |
| 300 | "null" |
| 301 | ] |
| 302 | }, |
| 303 | "cpu_left_legend": { |
| 304 | "type": [ |
| 305 | "boolean", |
| 306 | "null" |
| 307 | ] |
| 308 | }, |
| 309 | "current_usage": { |
| 310 | "type": [ |
| 311 | "boolean", |
| 312 | "null" |
| 313 | ] |
| 314 | }, |
| 315 | "default_time_value": { |
| 316 | "anyOf": [ |
| 317 | { |
| 318 | "$ref": "#/$defs/StringOrNum" |
| 319 | }, |
| 320 | { |
| 321 | "type": "null" |
| 322 | } |
| 323 | ] |
| 324 | }, |
| 325 | "default_widget_count": { |
| 326 | "type": [ |
| 327 | "integer", |
| 328 | "null" |
| 329 | ], |
| 330 | "format": "uint64", |
| 331 | "minimum": 0 |
| 332 | }, |
| 333 | "default_widget_type": { |
| 334 | "type": [ |
| 335 | "string", |
| 336 | "null" |
| 337 | ] |
| 338 | }, |
| 339 | "disable_advanced_kill": { |
| 340 | "type": [ |
| 341 | "boolean", |
| 342 | "null" |
| 343 | ] |
| 344 | }, |
| 345 | "disable_click": { |
| 346 | "type": [ |
| 347 | "boolean", |
| 348 | "null" |
| 349 | ] |
| 350 | }, |
| 351 | "disable_gpu": { |
| 352 | "type": [ |
| 353 | "boolean", |
| 354 | "null" |
| 355 | ] |
| 356 | }, |
| 357 | "disable_keys": { |
| 358 | "type": [ |
| 359 | "boolean", |
| 360 | "null" |
| 361 | ] |
| 362 | }, |
| 363 | "dot_marker": { |
| 364 | "type": [ |
| 365 | "boolean", |
| 366 | "null" |
| 367 | ] |
| 368 | }, |
| 369 | "enable_cache_memory": { |
| 370 | "type": [ |
| 371 | "boolean", |
| 372 | "null" |
| 373 | ] |
| 374 | }, |
| 375 | "expanded": { |
| 376 | "type": [ |
| 377 | "boolean", |
| 378 | "null" |
| 379 | ] |
| 380 | }, |
| 381 | "free_arc": { |
| 382 | "type": [ |
| 383 | "boolean", |
| 384 | "null" |
| 385 | ] |
| 386 | }, |
| 387 | "group_processes": { |
| 388 | "type": [ |
| 389 | "boolean", |
| 390 | "null" |
| 391 | ] |
| 392 | }, |
| 393 | "hide_avg_cpu": { |
| 394 | "type": [ |
| 395 | "boolean", |
| 396 | "null" |
| 397 | ] |
| 398 | }, |
| 399 | "hide_k_threads": { |
| 400 | "type": [ |
| 401 | "boolean", |
| 402 | "null" |
| 403 | ] |
| 404 | }, |
| 405 | "hide_table_gap": { |
| 406 | "type": [ |
| 407 | "boolean", |
| 408 | "null" |
| 409 | ] |
| 410 | }, |
| 411 | "hide_time": { |
| 412 | "type": [ |
| 413 | "boolean", |
| 414 | "null" |
| 415 | ] |
| 416 | }, |
| 417 | "memory_legend": { |
| 418 | "type": [ |
| 419 | "string", |
| 420 | "null" |
| 421 | ] |
| 422 | }, |
| 423 | "network_legend": { |
| 424 | "type": [ |
| 425 | "string", |
| 426 | "null" |
| 427 | ] |
| 428 | }, |
| 429 | "network_use_binary_prefix": { |
| 430 | "type": [ |
| 431 | "boolean", |
| 432 | "null" |
| 433 | ] |
| 434 | }, |
| 435 | "network_use_bytes": { |
| 436 | "type": [ |
| 437 | "boolean", |
| 438 | "null" |
| 439 | ] |
| 440 | }, |
| 441 | "network_use_log": { |
| 442 | "type": [ |
| 443 | "boolean", |
| 444 | "null" |
| 445 | ] |
| 446 | }, |
| 447 | "no_write": { |
| 448 | "type": [ |
| 449 | "boolean", |
| 450 | "null" |
| 451 | ] |
| 452 | }, |
| 453 | "process_command": { |
| 454 | "type": [ |
| 455 | "boolean", |
| 456 | "null" |
| 457 | ] |
| 458 | }, |
| 459 | "process_memory_as_value": { |
| 460 | "type": [ |
| 461 | "boolean", |
| 462 | "null" |
| 463 | ] |
| 464 | }, |
| 465 | "rate": { |
| 466 | "anyOf": [ |
| 467 | { |
| 468 | "$ref": "#/$defs/StringOrNum" |
| 469 | }, |
| 470 | { |
| 471 | "type": "null" |
| 472 | } |
| 473 | ] |
| 474 | }, |
| 475 | "read_only": { |
| 476 | "type": [ |
| 477 | "boolean", |
| 478 | "null" |
| 479 | ] |
| 480 | }, |
| 481 | "regex": { |
| 482 | "type": [ |
| 483 | "boolean", |
| 484 | "null" |
| 485 | ] |
| 486 | }, |
| 487 | "retention": { |
| 488 | "anyOf": [ |
| 489 | { |
| 490 | "$ref": "#/$defs/StringOrNum" |
| 491 | }, |
| 492 | { |
| 493 | "type": "null" |
| 494 | } |
| 495 | ] |
| 496 | }, |
| 497 | "show_table_scroll_position": { |
| 498 | "type": [ |
| 499 | "boolean", |
| 500 | "null" |
| 501 | ] |
| 502 | }, |
| 503 | "temperature_type": { |
| 504 | "type": [ |
| 505 | "string", |
| 506 | "null" |
| 507 | ] |
| 508 | }, |
| 509 | "time_delta": { |
| 510 | "anyOf": [ |
| 511 | { |
| 512 | "$ref": "#/$defs/StringOrNum" |
| 513 | }, |
| 514 | { |
| 515 | "type": "null" |
| 516 | } |
| 517 | ] |
| 518 | }, |
| 519 | "tree": { |
| 520 | "type": [ |
| 521 | "boolean", |
| 522 | "null" |
| 523 | ] |
| 524 | }, |
| 525 | "tree_collapse": { |
| 526 | "type": [ |
| 527 | "boolean", |
| 528 | "null" |
| 529 | ] |
| 530 | }, |
| 531 | "unnormalized_cpu": { |
| 532 | "type": [ |
| 533 | "boolean", |
| 534 | "null" |
| 535 | ] |
| 536 | }, |
| 537 | "use_old_network_legend": { |
| 538 | "type": [ |
| 539 | "boolean", |
| 540 | "null" |
| 541 | ] |
| 542 | }, |
| 543 | "whole_word": { |
| 544 | "type": [ |
| 545 | "boolean", |
| 546 | "null" |
| 547 | ] |
| 548 | } |
| 549 | } |
| 550 | }, |
| 551 | "GraphStyle": { |
| 552 | "description": "General styling for graph widgets.", |
| 553 | "type": "object", |
| 554 | "properties": { |
| 555 | "graph_color": { |
| 556 | "description": "The general colour of the parts of the graph.", |
| 557 | "anyOf": [ |
| 558 | { |
| 559 | "$ref": "#/$defs/ColorStr" |
| 560 | }, |
| 561 | { |
| 562 | "type": "null" |
| 563 | } |
| 564 | ] |
| 565 | }, |
| 566 | "legend_text": { |
| 567 | "description": "Text styling for graph's legend text.", |
| 568 | "anyOf": [ |
| 569 | { |
| 570 | "$ref": "#/$defs/TextStyleConfig" |
| 571 | }, |
| 572 | { |
| 573 | "type": "null" |
| 574 | } |
| 575 | ] |
| 576 | } |
| 577 | } |
| 578 | }, |
| 579 | "IgnoreList": { |
| 580 | "type": "object", |
| 581 | "properties": { |
| 582 | "case_sensitive": { |
| 583 | "type": "boolean", |
| 584 | "default": false |
| 585 | }, |
| 586 | "is_list_ignored": { |
| 587 | "type": "boolean", |
| 588 | "default": true |
| 589 | }, |
| 590 | "list": { |
| 591 | "type": "array", |
| 592 | "items": { |
| 593 | "type": "string" |
| 594 | } |
| 595 | }, |
| 596 | "regex": { |
| 597 | "type": "boolean", |
| 598 | "default": false |
| 599 | }, |
| 600 | "whole_word": { |
| 601 | "type": "boolean", |
| 602 | "default": false |
| 603 | } |
| 604 | }, |
| 605 | "required": [ |
| 606 | "list" |
| 607 | ] |
| 608 | }, |
| 609 | "MemoryStyle": { |
| 610 | "description": "Styling specific to the memory widget.", |
| 611 | "type": "object", |
| 612 | "properties": { |
| 613 | "arc_color": { |
| 614 | "description": "The colour of the ARC label and graph line.", |
| 615 | "anyOf": [ |
| 616 | { |
| 617 | "$ref": "#/$defs/ColorStr" |
| 618 | }, |
| 619 | { |
| 620 | "type": "null" |
| 621 | } |
| 622 | ] |
| 623 | }, |
| 624 | "cache_color": { |
| 625 | "description": "The colour of the cache label and graph line. Does not do anything on Windows.", |
| 626 | "anyOf": [ |
| 627 | { |
| 628 | "$ref": "#/$defs/ColorStr" |
| 629 | }, |
| 630 | { |
| 631 | "type": "null" |
| 632 | } |
| 633 | ] |
| 634 | }, |
| 635 | "gpu_colors": { |
| 636 | "description": "Colour of each GPU's memory label and graph line. Read in order.", |
| 637 | "type": [ |
| 638 | "array", |
| 639 | "null" |
| 640 | ], |
| 641 | "items": { |
| 642 | "$ref": "#/$defs/ColorStr" |
| 643 | } |
| 644 | }, |
| 645 | "ram_color": { |
| 646 | "description": "The colour of the RAM label and graph line.", |
| 647 | "anyOf": [ |
| 648 | { |
| 649 | "$ref": "#/$defs/ColorStr" |
| 650 | }, |
| 651 | { |
| 652 | "type": "null" |
| 653 | } |
| 654 | ] |
| 655 | }, |
| 656 | "swap_color": { |
| 657 | "description": "The colour of the swap label and graph line.", |
| 658 | "anyOf": [ |
| 659 | { |
| 660 | "$ref": "#/$defs/ColorStr" |
| 661 | }, |
| 662 | { |
| 663 | "type": "null" |
| 664 | } |
| 665 | ] |
| 666 | } |
| 667 | } |
| 668 | }, |
| 669 | "NetworkConfig": { |
| 670 | "description": "Network configuration.", |
| 671 | "type": "object", |
| 672 | "properties": { |
| 673 | "interface_filter": { |
| 674 | "description": "A filter over the network interface names.", |
| 675 | "anyOf": [ |
| 676 | { |
| 677 | "$ref": "#/$defs/IgnoreList" |
| 678 | }, |
| 679 | { |
| 680 | "type": "null" |
| 681 | } |
| 682 | ] |
| 683 | } |
| 684 | } |
| 685 | }, |
| 686 | "NetworkStyle": { |
| 687 | "description": "Styling specific to the network widget.", |
| 688 | "type": "object", |
| 689 | "properties": { |
| 690 | "rx_color": { |
| 691 | "description": "The colour of the RX (download) label and graph line.", |
| 692 | "anyOf": [ |
| 693 | { |
| 694 | "$ref": "#/$defs/ColorStr" |
| 695 | }, |
| 696 | { |
| 697 | "type": "null" |
| 698 | } |
| 699 | ] |
| 700 | }, |
| 701 | "rx_total_color": { |
| 702 | "description": "he colour of the total RX (download) label in basic mode.", |
| 703 | "anyOf": [ |
| 704 | { |
| 705 | "$ref": "#/$defs/ColorStr" |
| 706 | }, |
| 707 | { |
| 708 | "type": "null" |
| 709 | } |
| 710 | ] |
| 711 | }, |
| 712 | "tx_color": { |
| 713 | "description": "The colour of the TX (upload) label and graph line.", |
| 714 | "anyOf": [ |
| 715 | { |
| 716 | "$ref": "#/$defs/ColorStr" |
| 717 | }, |
| 718 | { |
| 719 | "type": "null" |
| 720 | } |
| 721 | ] |
| 722 | }, |
| 723 | "tx_total_color": { |
| 724 | "description": "The colour of the total TX (upload) label in basic mode.", |
| 725 | "anyOf": [ |
| 726 | { |
| 727 | "$ref": "#/$defs/ColorStr" |
| 728 | }, |
| 729 | { |
| 730 | "type": "null" |
| 731 | } |
| 732 | ] |
| 733 | } |
| 734 | } |
| 735 | }, |
| 736 | "ProcColumn": { |
| 737 | "description": "A column in the process widget.", |
| 738 | "type": "string", |
| 739 | "enum": [ |
| 740 | "CPU%", |
| 741 | "Command", |
| 742 | "Count", |
| 743 | "GMem", |
| 744 | "GMem%", |
| 745 | "GPU%", |
| 746 | "Mem", |
| 747 | "Mem%", |
| 748 | "Memory", |
| 749 | "Memory%", |
| 750 | "Name", |
| 751 | "Nice", |
| 752 | "PID", |
| 753 | "Priority", |
| 754 | "R/s", |
| 755 | "Read", |
| 756 | "Rps", |
| 757 | "State", |
| 758 | "T.Read", |
| 759 | "T.Write", |
| 760 | "TRead", |
| 761 | "TWrite", |
| 762 | "Time", |
| 763 | "Total Read", |
| 764 | "Total Write", |
| 765 | "User", |
| 766 | "Virt", |
| 767 | "VirtMem", |
| 768 | "Virtual", |
| 769 | "Virtual Memory", |
| 770 | "W/s", |
| 771 | "Wps", |
| 772 | "Write" |
| 773 | ] |
| 774 | }, |
| 775 | "ProcessesConfig": { |
| 776 | "description": "Process configuration.", |
| 777 | "type": "object", |
| 778 | "properties": { |
| 779 | "columns": { |
| 780 | "description": "A list of process widget columns.", |
| 781 | "type": "array", |
| 782 | "items": { |
| 783 | "$ref": "#/$defs/ProcColumn" |
| 784 | } |
| 785 | }, |
| 786 | "get_threads": { |
| 787 | "description": "Whether to get process child threads.", |
| 788 | "type": [ |
| 789 | "boolean", |
| 790 | "null" |
| 791 | ] |
| 792 | } |
| 793 | } |
| 794 | }, |
| 795 | "RowChildren": { |
| 796 | "description": "Represents a child of a Row - either a Col (column) or a FinalWidget.\n\nA Col can also have an optional length and children. We only allow columns\nto have FinalWidgets as children, lest we get some amount of mutual\nrecursion between Row and Col.", |
| 797 | "anyOf": [ |
| 798 | { |
| 799 | "$ref": "#/$defs/FinalWidget" |
| 800 | }, |
| 801 | { |
| 802 | "type": "object", |
| 803 | "properties": { |
| 804 | "child": { |
| 805 | "type": "array", |
| 806 | "items": { |
| 807 | "$ref": "#/$defs/FinalWidget" |
| 808 | } |
| 809 | }, |
| 810 | "ratio": { |
| 811 | "type": [ |
| 812 | "integer", |
| 813 | "null" |
| 814 | ], |
| 815 | "format": "uint16", |
| 816 | "maximum": 65535, |
| 817 | "minimum": 0 |
| 818 | } |
| 819 | }, |
| 820 | "required": [ |
| 821 | "child" |
| 822 | ] |
| 823 | } |
| 824 | ] |
| 825 | }, |
| 826 | "StringOrNum": { |
| 827 | "anyOf": [ |
| 828 | { |
| 829 | "type": "string" |
| 830 | }, |
| 831 | { |
| 832 | "type": "integer", |
| 833 | "format": "uint64", |
| 834 | "minimum": 0 |
| 835 | } |
| 836 | ] |
| 837 | }, |
| 838 | "StyleConfig": { |
| 839 | "description": "Style-related configs.", |
| 840 | "type": "object", |
| 841 | "properties": { |
| 842 | "battery": { |
| 843 | "description": "Styling for the battery widget.", |
| 844 | "anyOf": [ |
| 845 | { |
| 846 | "$ref": "#/$defs/BatteryStyle" |
| 847 | }, |
| 848 | { |
| 849 | "type": "null" |
| 850 | } |
| 851 | ] |
| 852 | }, |
| 853 | "cpu": { |
| 854 | "description": "Styling for the CPU widget.", |
| 855 | "anyOf": [ |
| 856 | { |
| 857 | "$ref": "#/$defs/CpuStyle" |
| 858 | }, |
| 859 | { |
| 860 | "type": "null" |
| 861 | } |
| 862 | ] |
| 863 | }, |
| 864 | "graphs": { |
| 865 | "description": "Styling for graph widgets.", |
| 866 | "anyOf": [ |
| 867 | { |
| 868 | "$ref": "#/$defs/GraphStyle" |
| 869 | }, |
| 870 | { |
| 871 | "type": "null" |
| 872 | } |
| 873 | ] |
| 874 | }, |
| 875 | "memory": { |
| 876 | "description": "Styling for the memory widget.", |
| 877 | "anyOf": [ |
| 878 | { |
| 879 | "$ref": "#/$defs/MemoryStyle" |
| 880 | }, |
| 881 | { |
| 882 | "type": "null" |
| 883 | } |
| 884 | ] |
| 885 | }, |
| 886 | "network": { |
| 887 | "description": "Styling for the network widget.", |
| 888 | "anyOf": [ |
| 889 | { |
| 890 | "$ref": "#/$defs/NetworkStyle" |
| 891 | }, |
| 892 | { |
| 893 | "type": "null" |
| 894 | } |
| 895 | ] |
| 896 | }, |
| 897 | "tables": { |
| 898 | "description": "Styling for table widgets.", |
| 899 | "anyOf": [ |
| 900 | { |
| 901 | "$ref": "#/$defs/TableStyle" |
| 902 | }, |
| 903 | { |
| 904 | "type": "null" |
| 905 | } |
| 906 | ] |
| 907 | }, |
| 908 | "theme": { |
| 909 | "description": "A built-in theme.\n\nIf this is and a custom colour are both set, in the config file,\nthe custom colour scheme will be prioritized first. If a theme\nis set in the command-line args, however, it will always be\nprioritized first.", |
| 910 | "type": [ |
| 911 | "string", |
| 912 | "null" |
| 913 | ] |
| 914 | }, |
| 915 | "widgets": { |
| 916 | "description": "Styling for general widgets.", |
| 917 | "anyOf": [ |
| 918 | { |
| 919 | "$ref": "#/$defs/WidgetStyle" |
| 920 | }, |
| 921 | { |
| 922 | "type": "null" |
| 923 | } |
| 924 | ] |
| 925 | } |
| 926 | } |
| 927 | }, |
| 928 | "TableStyle": { |
| 929 | "description": "General styling for table widgets.", |
| 930 | "type": "object", |
| 931 | "properties": { |
| 932 | "headers": { |
| 933 | "description": "Text styling for table headers.", |
| 934 | "anyOf": [ |
| 935 | { |
| 936 | "$ref": "#/$defs/TextStyleConfig" |
| 937 | }, |
| 938 | { |
| 939 | "type": "null" |
| 940 | } |
| 941 | ] |
| 942 | } |
| 943 | } |
| 944 | }, |
| 945 | "TempConfig": { |
| 946 | "description": "Temperature configuration.", |
| 947 | "type": "object", |
| 948 | "properties": { |
| 949 | "sensor_filter": { |
| 950 | "description": "A filter over the sensor names.", |
| 951 | "anyOf": [ |
| 952 | { |
| 953 | "$ref": "#/$defs/IgnoreList" |
| 954 | }, |
| 955 | { |
| 956 | "type": "null" |
| 957 | } |
| 958 | ] |
| 959 | } |
| 960 | } |
| 961 | }, |
| 962 | "TextStyleConfig": { |
| 963 | "description": "A style for text.", |
| 964 | "anyOf": [ |
| 965 | { |
| 966 | "$ref": "#/$defs/ColorStr" |
| 967 | }, |
| 968 | { |
| 969 | "type": "object", |
| 970 | "properties": { |
| 971 | "bg_color": { |
| 972 | "description": "A built-in ANSI colour, RGB hex, or RGB colour code.", |
| 973 | "anyOf": [ |
| 974 | { |
| 975 | "$ref": "#/$defs/ColorStr" |
| 976 | }, |
| 977 | { |
| 978 | "type": "null" |
| 979 | } |
| 980 | ] |
| 981 | }, |
| 982 | "bold": { |
| 983 | "description": "Whether to make this text bolded or not. If not set,\nwill default to built-in defaults.", |
| 984 | "type": [ |
| 985 | "boolean", |
| 986 | "null" |
| 987 | ] |
| 988 | }, |
| 989 | "color": { |
| 990 | "description": "A built-in ANSI colour, RGB hex, or RGB colour code.", |
| 991 | "anyOf": [ |
| 992 | { |
| 993 | "$ref": "#/$defs/ColorStr" |
| 994 | }, |
| 995 | { |
| 996 | "type": "null" |
| 997 | } |
| 998 | ] |
| 999 | }, |
| 1000 | "italics": { |
| 1001 | "description": "Whether to make this text italicized or not. If not set,\nwill default to built-in defaults.", |
| 1002 | "type": [ |
| 1003 | "boolean", |
| 1004 | "null" |
| 1005 | ] |
| 1006 | } |
| 1007 | } |
| 1008 | } |
| 1009 | ] |
| 1010 | }, |
| 1011 | "WidgetBorderType": { |
| 1012 | "type": "string", |
| 1013 | "enum": [ |
| 1014 | "Default", |
| 1015 | "Rounded", |
| 1016 | "Double", |
| 1017 | "Thick" |
| 1018 | ] |
| 1019 | }, |
| 1020 | "WidgetStyle": { |
| 1021 | "description": "General styling for generic widgets.", |
| 1022 | "type": "object", |
| 1023 | "properties": { |
| 1024 | "border_color": { |
| 1025 | "description": "The colour of the widgets' borders.", |
| 1026 | "anyOf": [ |
| 1027 | { |
| 1028 | "$ref": "#/$defs/ColorStr" |
| 1029 | }, |
| 1030 | { |
| 1031 | "type": "null" |
| 1032 | } |
| 1033 | ] |
| 1034 | }, |
| 1035 | "disabled_text": { |
| 1036 | "description": "Text styling for text when representing something that is disabled.", |
| 1037 | "anyOf": [ |
| 1038 | { |
| 1039 | "$ref": "#/$defs/TextStyleConfig" |
| 1040 | }, |
| 1041 | { |
| 1042 | "type": "null" |
| 1043 | } |
| 1044 | ] |
| 1045 | }, |
| 1046 | "selected_border_color": { |
| 1047 | "description": "The colour of a widget's borders when the widget is selected.", |
| 1048 | "anyOf": [ |
| 1049 | { |
| 1050 | "$ref": "#/$defs/ColorStr" |
| 1051 | }, |
| 1052 | { |
| 1053 | "type": "null" |
| 1054 | } |
| 1055 | ] |
| 1056 | }, |
| 1057 | "selected_text": { |
| 1058 | "description": "Text styling for text when representing something that is selected.", |
| 1059 | "anyOf": [ |
| 1060 | { |
| 1061 | "$ref": "#/$defs/TextStyleConfig" |
| 1062 | }, |
| 1063 | { |
| 1064 | "type": "null" |
| 1065 | } |
| 1066 | ] |
| 1067 | }, |
| 1068 | "text": { |
| 1069 | "description": "Text styling for text in general.", |
| 1070 | "anyOf": [ |
| 1071 | { |
| 1072 | "$ref": "#/$defs/TextStyleConfig" |
| 1073 | }, |
| 1074 | { |
| 1075 | "type": "null" |
| 1076 | } |
| 1077 | ] |
| 1078 | }, |
| 1079 | "thread_text": { |
| 1080 | "description": "Text styling for text when representing process threads. Only usable\non Linux at the moment.", |
| 1081 | "anyOf": [ |
| 1082 | { |
| 1083 | "$ref": "#/$defs/TextStyleConfig" |
| 1084 | }, |
| 1085 | { |
| 1086 | "type": "null" |
| 1087 | } |
| 1088 | ] |
| 1089 | }, |
| 1090 | "widget_border_type": { |
| 1091 | "description": "Widget borders type.", |
| 1092 | "anyOf": [ |
| 1093 | { |
| 1094 | "$ref": "#/$defs/WidgetBorderType" |
| 1095 | }, |
| 1096 | { |
| 1097 | "type": "null" |
| 1098 | } |
| 1099 | ] |
| 1100 | }, |
| 1101 | "widget_title": { |
| 1102 | "description": "Text styling for a widget's title.", |
| 1103 | "anyOf": [ |
| 1104 | { |
| 1105 | "$ref": "#/$defs/TextStyleConfig" |
| 1106 | }, |
| 1107 | { |
| 1108 | "type": "null" |
| 1109 | } |
| 1110 | ] |
| 1111 | } |
| 1112 | } |
| 1113 | }, |
| 1114 | "row": { |
| 1115 | "description": "Represents a row. This has a length of some sort (optional) and a vector\nof children.", |
| 1116 | "type": "object", |
| 1117 | "properties": { |
| 1118 | "child": { |
| 1119 | "type": [ |
| 1120 | "array", |
| 1121 | "null" |
| 1122 | ], |
| 1123 | "items": { |
| 1124 | "$ref": "#/$defs/RowChildren" |
| 1125 | } |
| 1126 | }, |
| 1127 | "ratio": { |
| 1128 | "type": [ |
| 1129 | "integer", |
| 1130 | "null" |
| 1131 | ], |
| 1132 | "format": "uint16", |
| 1133 | "maximum": 65535, |
| 1134 | "minimum": 0 |
| 1135 | } |
| 1136 | } |
| 1137 | } |
| 1138 | } |
| 1139 | } |