diff --git a/Cargo.lock b/Cargo.lock index c1a910d0..f3ee8e7e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -105,9 +105,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "base64" -version = "0.22.1" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" [[package]] name = "bitflags" @@ -153,7 +153,7 @@ dependencies = [ "itertools 0.15.0", "libc", "log", - "mach2 0.7.0", + "mach2", "nvml-wrapper", "portable-pty", "predicates", @@ -212,9 +212,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" [[package]] name = "cfg_aliases" @@ -856,19 +856,13 @@ checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" [[package]] name = "lru" -version = "0.18.0" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a860605968fce16869fd239cf4237a82f3ac470723415db603b0e8b6c8d4fb9" +checksum = "ef9ac18847474e638e3702b76c65d4eb93428471a74778ef0f1be711717f89b5" dependencies = [ "hashbrown 0.17.1", ] -[[package]] -name = "mach2" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dae608c151f68243f2b000364e1f7b186d9c29845f7d2d85bd31b9ad77ad552b" - [[package]] name = "mach2" version = "0.7.0" @@ -1109,9 +1103,9 @@ dependencies = [ [[package]] name = "plist" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da1d65da6dd5d1e44199ac0f58712d241c0f439f80adea8924d832384087f85" +checksum = "2896bade328c13f7042a297ea5ac5b0951f6cf989dea5f32c2fd98da398195cb" dependencies = [ "base64", "indexmap", @@ -1194,9 +1188,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.41.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" +checksum = "41b1177fdf999d2321d3fb46ff47159d9c1fb9ad66a4879f8c50a0b504615e9b" dependencies = [ "memchr", ] @@ -1567,14 +1561,14 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "starship-battery" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e919b7ecd99f2d5ed9efdc8d242ae93d91684181a782dadcbcd72079930155f9" +checksum = "a39fd9579fda6d69713f9a2ce793e4488a25a21583006ec7197c5eb73e110bf7" dependencies = [ "cfg-if", "lazycell", "libc", - "mach2 0.6.0", + "mach2", "nix 0.31.3", "num-traits", "objc2-core-foundation", diff --git a/Cargo.toml b/Cargo.toml index 8db32cd0..f4450569 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -93,7 +93,7 @@ ratatui-core = "0.1.2" regex = "1.13.1" rustc-hash = "2.1.3" serde = { version = "1.0.228", features = ["derive"] } -starship-battery = { version = "0.11.1", optional = true } +starship-battery = { version = "0.12.0", optional = true } sysinfo = "=0.39.6" timeless = "0.1.0" toml_edit = { version = "0.25.12", features = ["serde"] } diff --git a/schema/nightly/bottom.json b/schema/nightly/bottom.json index e69de29b..05dafbe0 100644 --- a/schema/nightly/bottom.json +++ b/schema/nightly/bottom.json @@ -0,0 +1,1720 @@ +{ + "$id": "https://github.com/ClementTsang/bottom/blob/main/schema/nightly/bottom.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Schema for bottom's config file (nightly)", + "description": "https://bottom.pages.dev/nightly/configuration/config-file/", + "type": "object", + "properties": { + "cpu": { + "anyOf": [ + { + "$ref": "#/$defs/CpuConfig" + }, + { + "type": "null" + } + ] + }, + "disk": { + "anyOf": [ + { + "$ref": "#/$defs/DiskConfig" + }, + { + "type": "null" + } + ] + }, + "disk_io_graph": { + "anyOf": [ + { + "$ref": "#/$defs/DiskIoGraphConfig" + }, + { + "type": "null" + } + ] + }, + "flags": { + "anyOf": [ + { + "$ref": "#/$defs/GeneralConfig" + }, + { + "type": "null" + } + ] + }, + "memory_graph": { + "anyOf": [ + { + "$ref": "#/$defs/MemoryGraphConfig" + }, + { + "type": "null" + } + ] + }, + "network_graph": { + "anyOf": [ + { + "$ref": "#/$defs/NetworkGraphConfig" + }, + { + "type": "null" + } + ] + }, + "processes": { + "anyOf": [ + { + "$ref": "#/$defs/ProcessesConfig" + }, + { + "type": "null" + } + ] + }, + "row": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/$defs/row" + } + }, + "styles": { + "anyOf": [ + { + "$ref": "#/$defs/StyleConfig" + }, + { + "type": "null" + } + ] + }, + "temperature": { + "anyOf": [ + { + "$ref": "#/$defs/TempConfig" + }, + { + "type": "null" + } + ] + }, + "temperature_graph": { + "anyOf": [ + { + "$ref": "#/$defs/TempGraphConfig" + }, + { + "type": "null" + } + ] + } + }, + "$defs": { + "BatteryStyle": { + "description": "Styling specific to the battery widget.", + "type": "object", + "properties": { + "high_battery_colour": { + "description": "The colour of the battery widget bar when the battery is over 50%.", + "anyOf": [ + { + "$ref": "#/$defs/ColourStr" + }, + { + "type": "null" + } + ] + }, + "low_battery_colour": { + "description": "The colour of the battery widget bar when the battery is under 10%.", + "anyOf": [ + { + "$ref": "#/$defs/ColourStr" + }, + { + "type": "null" + } + ] + }, + "medium_battery_colour": { + "description": "The colour of the battery widget bar when the battery between 10% to\n50%.", + "anyOf": [ + { + "$ref": "#/$defs/ColourStr" + }, + { + "type": "null" + } + ] + } + } + }, + "ColourStr": { + "type": "string" + }, + "CpuConfig": { + "description": "CPU column settings.", + "type": "object", + "properties": { + "basic_average_cpu_row": { + "description": "Whether to give the average CPU entry a dedicated row in basic mode.", + "type": [ + "boolean", + "null" + ] + }, + "default": { + "description": "The default selected entry of the CPU widget.", + "$ref": "#/$defs/CpuDefault" + }, + "hide_avg_cpu": { + "description": "Whether to hide the average CPU entry.", + "type": [ + "boolean", + "null" + ] + }, + "left_legend": { + "description": "Whether to put the CPU chart legend on the left side.", + "type": [ + "boolean", + "null" + ] + }, + "show_decimal": { + "description": "Whether to show a decimal place for CPU usage values.", + "type": [ + "boolean", + "null" + ] + } + } + }, + "CpuDefault": { + "description": "The default selected entry of the CPU widget.", + "type": "string", + "enum": [ + "all", + "average" + ] + }, + "CpuStyle": { + "description": "Styling specific to the CPU widget.", + "type": "object", + "properties": { + "all_entry_colour": { + "description": "The colour of the \"All\" CPU label.", + "anyOf": [ + { + "$ref": "#/$defs/ColourStr" + }, + { + "type": "null" + } + ] + }, + "avg_entry_colour": { + "description": "The colour of the average CPU label and graph line.", + "anyOf": [ + { + "$ref": "#/$defs/ColourStr" + }, + { + "type": "null" + } + ] + }, + "cpu_core_colours": { + "description": "Colour of each CPU threads' label and graph line. Read in order.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/$defs/ColourStr" + } + } + } + }, + "DiskConfig": { + "description": "Disk configuration.", + "type": "object", + "properties": { + "columns": { + "description": "A list of disk widget columns.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/$defs/DiskWidgetColumn" + } + }, + "default_sort": { + "description": "The default sort column.", + "anyOf": [ + { + "$ref": "#/$defs/DiskWidgetColumn" + }, + { + "type": "null" + } + ] + }, + "include_unmounted": { + "description": "Whether to include block devices that aren't currently mounted\n(currently Linux only). Defaults to false.", + "type": [ + "boolean", + "null" + ] + }, + "mount_filter": { + "description": "A filter over the mount names.", + "anyOf": [ + { + "$ref": "#/$defs/IgnoreList" + }, + { + "type": "null" + } + ] + }, + "name_filter": { + "description": "A filter over the disk names.", + "anyOf": [ + { + "$ref": "#/$defs/IgnoreList" + }, + { + "type": "null" + } + ] + }, + "sort_order": { + "description": "The default sort order. Defaults to ascending.", + "$ref": "#/$defs/SortOrder" + }, + "use_binary_prefix": { + "description": "Use binary prefixes (e.g. GiB, MiB) instead of decimal prefixes (e.g. GB, MB).\n\nDefaults to decimal prefixes.", + "type": [ + "boolean", + "null" + ] + } + } + }, + "DiskGraphLegend": { + "description": "Whether the disk graph legend labels use device names or mount points.", + "oneOf": [ + { + "description": "Label entries by kernel device name (e.g. `sda`, `nvme0n1`).", + "type": "string", + "const": "disk" + }, + { + "description": "Label entries by mount point (e.g. `/`, `/home`).", + "type": "string", + "const": "mount" + } + ] + }, + "DiskIoGraphConfig": { + "description": "Disk I/O graph configuration.", + "type": "object", + "properties": { + "include_unmounted": { + "description": "Whether to include block devices that aren't currently mounted\n(currently Linux only). Defaults to false.", + "type": [ + "boolean", + "null" + ] + }, + "legend": { + "description": "Whether to label legend entries by device name or mount point. Defaults\nto disk name.", + "anyOf": [ + { + "$ref": "#/$defs/DiskGraphLegend" + }, + { + "type": "null" + } + ] + }, + "legend_position": { + "description": "Where to position the legend within the widget.", + "type": [ + "string", + "null" + ] + }, + "name_filter": { + "description": "An optional list of device names to include or exclude.", + "anyOf": [ + { + "$ref": "#/$defs/IgnoreList" + }, + { + "type": "null" + } + ] + }, + "show_read": { + "description": "Whether to show the read rate line. Defaults to true.", + "type": [ + "boolean", + "null" + ] + }, + "show_write": { + "description": "Whether to show the write rate line. Defaults to true.", + "type": [ + "boolean", + "null" + ] + }, + "use_log": { + "description": "Whether to use a logarithmic scale on the y-axis. Defaults to false.", + "type": [ + "boolean", + "null" + ] + } + } + }, + "DiskIoGraphStyle": { + "description": "Styling specific to the disk I/O graph widget.", + "type": "object", + "properties": { + "read_colours": { + "description": "Colour of each disk's read rate graph line. Read in order.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/$defs/ColourStr" + } + }, + "write_colours": { + "description": "Colour of each disk's write rate graph line. Read in order.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/$defs/ColourStr" + } + } + } + }, + "DiskWidgetColumn": { + "type": "string", + "enum": [ + "Disk", + "Free", + "Free%", + "Mount", + "R/s", + "Read", + "Rps", + "Total", + "Used", + "Used%", + "W/s", + "Wps", + "Write", + "disk", + "free", + "free%", + "mount", + "r/s", + "read", + "rps", + "total", + "used", + "used%", + "w/s", + "wps", + "write" + ] + }, + "FinalWidget": { + "description": "Represents a widget.", + "type": "object", + "properties": { + "default": { + "type": [ + "boolean", + "null" + ] + }, + "ratio": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "maximum": 65535, + "minimum": 0 + }, + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "GeneralConfig": { + "type": "object", + "properties": { + "autohide_time": { + "type": [ + "boolean", + "null" + ] + }, + "average_cpu_row": { + "type": [ + "boolean", + "null" + ] + }, + "basic": { + "type": [ + "boolean", + "null" + ] + }, + "battery": { + "type": [ + "boolean", + "null" + ] + }, + "case_sensitive": { + "type": [ + "boolean", + "null" + ] + }, + "cpu_left_legend": { + "type": [ + "boolean", + "null" + ] + }, + "current_usage": { + "type": [ + "boolean", + "null" + ] + }, + "default_time_value": { + "anyOf": [ + { + "$ref": "#/$defs/StringOrNum" + }, + { + "type": "null" + } + ] + }, + "default_widget_count": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0 + }, + "default_widget_type": { + "type": [ + "string", + "null" + ] + }, + "disable_advanced_kill": { + "type": [ + "boolean", + "null" + ] + }, + "disable_click": { + "type": [ + "boolean", + "null" + ] + }, + "disable_gpu": { + "type": [ + "boolean", + "null" + ] + }, + "disable_keys": { + "type": [ + "boolean", + "null" + ] + }, + "dot_marker": { + "type": [ + "boolean", + "null" + ] + }, + "enable_cache_memory": { + "type": [ + "boolean", + "null" + ] + }, + "expanded": { + "type": [ + "boolean", + "null" + ] + }, + "free_arc": { + "type": [ + "boolean", + "null" + ] + }, + "group_processes": { + "type": [ + "boolean", + "null" + ] + }, + "hide_avg_cpu": { + "type": [ + "boolean", + "null" + ] + }, + "hide_k_threads": { + "type": [ + "boolean", + "null" + ] + }, + "hide_time": { + "type": [ + "boolean", + "null" + ] + }, + "memory_legend": { + "type": [ + "string", + "null" + ] + }, + "network_legend": { + "type": [ + "string", + "null" + ] + }, + "network_use_binary_prefix": { + "type": [ + "boolean", + "null" + ] + }, + "network_use_bytes": { + "type": [ + "boolean", + "null" + ] + }, + "network_use_log": { + "type": [ + "boolean", + "null" + ] + }, + "no_write": { + "type": [ + "boolean", + "null" + ] + }, + "process_command": { + "type": [ + "boolean", + "null" + ] + }, + "process_memory_as_value": { + "type": [ + "boolean", + "null" + ] + }, + "rate": { + "anyOf": [ + { + "$ref": "#/$defs/StringOrNum" + }, + { + "type": "null" + } + ] + }, + "read_only": { + "type": [ + "boolean", + "null" + ] + }, + "regex": { + "type": [ + "boolean", + "null" + ] + }, + "retention": { + "anyOf": [ + { + "$ref": "#/$defs/StringOrNum" + }, + { + "type": "null" + } + ] + }, + "show_table_scroll_bar": { + "type": [ + "boolean", + "null" + ] + }, + "show_table_scroll_position": { + "type": [ + "boolean", + "null" + ] + }, + "table_gap": { + "$ref": "#/$defs/TableGap", + "default": "space" + }, + "temperature_type": { + "type": [ + "string", + "null" + ] + }, + "time_delta": { + "anyOf": [ + { + "$ref": "#/$defs/StringOrNum" + }, + { + "type": "null" + } + ] + }, + "tree": { + "type": [ + "boolean", + "null" + ] + }, + "tree_collapse": { + "type": [ + "boolean", + "null" + ] + }, + "unnormalized_cpu": { + "type": [ + "boolean", + "null" + ] + }, + "use_old_network_legend": { + "type": [ + "boolean", + "null" + ] + }, + "whole_word": { + "type": [ + "boolean", + "null" + ] + } + } + }, + "GraphStyle": { + "description": "General styling for graph widgets.", + "type": "object", + "properties": { + "graph_colour": { + "description": "The general colour of the parts of the graph.", + "anyOf": [ + { + "$ref": "#/$defs/ColourStr" + }, + { + "type": "null" + } + ] + }, + "legend_text": { + "description": "Text styling for graph's legend text.", + "anyOf": [ + { + "$ref": "#/$defs/TextStyleConfig" + }, + { + "type": "null" + } + ] + } + } + }, + "IgnoreList": { + "type": "object", + "properties": { + "case_sensitive": { + "type": "boolean", + "default": false + }, + "is_list_ignored": { + "type": "boolean", + "default": true + }, + "list": { + "type": "array", + "items": { + "type": "string" + } + }, + "regex": { + "type": "boolean", + "default": false + }, + "whole_word": { + "type": "boolean", + "default": false + } + }, + "required": [ + "list" + ] + }, + "MemoryGraphConfig": { + "description": "Memory-related configuration file options.", + "type": "object", + "properties": { + "cache_memory": { + "description": "Whether to collect and display cache and buffer memory. Not available on\nWindows.", + "type": [ + "boolean", + "null" + ] + }, + "free_arc": { + "description": "Whether to subtract ARC that can be freed from memory usage.", + "type": [ + "boolean", + "null" + ] + }, + "legend_position": { + "description": "Where to place the legend for the memory chart widget.", + "type": [ + "string", + "null" + ] + }, + "short_gpu_names": { + "description": "Whether to use short GPU names in the memory widget.", + "type": [ + "boolean", + "null" + ] + } + } + }, + "MemoryStyle": { + "description": "Styling specific to the memory widget.", + "type": "object", + "properties": { + "arc_colour": { + "description": "The colour of the ARC label and graph line.", + "anyOf": [ + { + "$ref": "#/$defs/ColourStr" + }, + { + "type": "null" + } + ] + }, + "cache_colour": { + "description": "The colour of the cache label and graph line. Does not do anything on\nWindows.", + "anyOf": [ + { + "$ref": "#/$defs/ColourStr" + }, + { + "type": "null" + } + ] + }, + "gpu_colours": { + "description": "Colour of each GPU's memory label and graph line. Read in order.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/$defs/ColourStr" + } + }, + "ram_colour": { + "description": "The colour of the RAM label and graph line.", + "anyOf": [ + { + "$ref": "#/$defs/ColourStr" + }, + { + "type": "null" + } + ] + }, + "swap_colour": { + "description": "The colour of the swap label and graph line.", + "anyOf": [ + { + "$ref": "#/$defs/ColourStr" + }, + { + "type": "null" + } + ] + } + } + }, + "NetworkGraphConfig": { + "description": "Network configuration.", + "type": "object", + "properties": { + "interface_filter": { + "description": "A filter over the network interface names.", + "anyOf": [ + { + "$ref": "#/$defs/IgnoreList" + }, + { + "type": "null" + } + ] + }, + "legend_position": { + "description": "Where to place the legend for the network chart widget.", + "type": [ + "string", + "null" + ] + }, + "show_packets": { + "description": "Displays packet rate and average packet size info.", + "type": [ + "boolean", + "null" + ] + }, + "start_zeroed": { + "description": "Zeroes out the total network usage (\"All\") counters so it shows the\ntotal usage since the app is started, rather than the total usage\nsince boot.", + "type": [ + "boolean", + "null" + ] + }, + "use_binary_prefix": { + "description": "Displays the network widget with a binary prefix (e.g. kibibits) rather\nthan a decimal prefix (e.g. kilobits). Defaults to decimal prefixes.", + "type": [ + "boolean", + "null" + ] + }, + "use_bytes": { + "description": "Displays the network widget using bytes. Defaults to bits.", + "type": [ + "boolean", + "null" + ] + }, + "use_log": { + "description": "Displays the network widget with a log scale. Defaults to a non-log\nscale.", + "type": [ + "boolean", + "null" + ] + } + } + }, + "NetworkStyle": { + "description": "Styling specific to the network widget.", + "type": "object", + "properties": { + "rx_colour": { + "description": "The colour of the RX (download) label and graph line.", + "anyOf": [ + { + "$ref": "#/$defs/ColourStr" + }, + { + "type": "null" + } + ] + }, + "rx_total_colour": { + "description": "The colour of the total RX (download) label in basic mode.", + "anyOf": [ + { + "$ref": "#/$defs/ColourStr" + }, + { + "type": "null" + } + ] + }, + "tx_colour": { + "description": "The colour of the TX (upload) label and graph line.", + "anyOf": [ + { + "$ref": "#/$defs/ColourStr" + }, + { + "type": "null" + } + ] + }, + "tx_total_colour": { + "description": "The colour of the total TX (upload) label in basic mode.", + "anyOf": [ + { + "$ref": "#/$defs/ColourStr" + }, + { + "type": "null" + } + ] + } + } + }, + "ProcColumn": { + "description": "A column in the process widget.", + "type": "string", + "enum": [ + "CPU%", + "Command", + "Count", + "GMem", + "GMem%", + "GPU%", + "Mem", + "Mem%", + "Memory", + "Memory%", + "Name", + "Nice", + "PID", + "Priority", + "R/s", + "Read", + "Rps", + "State", + "Swap", + "T.Read", + "T.Write", + "TRead", + "TWrite", + "Time", + "Total Read", + "Total Write", + "User", + "Virt", + "VirtMem", + "Virtual", + "Virtual Memory", + "W/s", + "Wps", + "Write", + "command", + "count", + "cpu%", + "gmem", + "gmem%", + "gpu%", + "mem", + "mem%", + "memory", + "memory%", + "name", + "nice", + "pid", + "priority", + "r/s", + "read", + "rps", + "state", + "swap", + "t.read", + "t.write", + "time", + "total read", + "total write", + "tread", + "twrite", + "user", + "virt", + "virtmem", + "virtual", + "virtual memory", + "w/s", + "wps", + "write" + ] + }, + "ProcessesConfig": { + "description": "Process configuration fields.", + "type": "object", + "properties": { + "case_sensitive": { + "description": "Enables case sensitivity by default when searching.", + "type": [ + "boolean", + "null" + ] + }, + "columns": { + "description": "A list of process widget columns.", + "type": "array", + "items": { + "$ref": "#/$defs/ProcColumn" + } + }, + "current_usage": { + "description": "Calculates process CPU usage as a percentage of current usage rather\nthan total usage.", + "type": [ + "boolean", + "null" + ] + }, + "default_grouped": { + "description": "Groups processes with the same name by default. No effect if `--tree` is\nset.", + "type": [ + "boolean", + "null" + ] + }, + "default_memory_value": { + "description": "Defaults to showing process memory usage by value.", + "type": [ + "boolean", + "null" + ] + }, + "default_sort": { + "description": "The default sort column.", + "anyOf": [ + { + "$ref": "#/$defs/ProcColumn" + }, + { + "type": "null" + } + ] + }, + "default_tree": { + "description": "Makes the process widget use tree mode by default.", + "type": [ + "boolean", + "null" + ] + }, + "disable_advanced_kill": { + "description": "Disable the advanced kill dialog and just show the basic one with no\noptions.", + "type": [ + "boolean", + "null" + ] + }, + "get_threads": { + "description": "Whether to get process child threads.", + "type": [ + "boolean", + "null" + ] + }, + "hide_k_threads": { + "description": "Hide kernel threads from being shown. Linux only.", + "type": [ + "boolean", + "null" + ] + }, + "process_command": { + "description": "Shows the full command name instead of the process name by default.", + "type": [ + "boolean", + "null" + ] + }, + "regex": { + "description": "Enables regex by default while searching.", + "type": [ + "boolean", + "null" + ] + }, + "sort_order": { + "description": "The default sort order. If not set, defaults to column-specific defaults\n(e.g. CPU usage is descending, process names are ascending).", + "anyOf": [ + { + "$ref": "#/$defs/SortOrder" + }, + { + "type": "null" + } + ] + }, + "tree_collapse": { + "description": "Collapse the process tree by default when tree mode is set.", + "type": [ + "boolean", + "null" + ] + }, + "unnormalized_cpu": { + "description": "Show process CPU% usage without averaging over the number of CPU cores.", + "type": [ + "boolean", + "null" + ] + }, + "whole_word": { + "description": "Enables whole-word matching by default while searching.", + "type": [ + "boolean", + "null" + ] + } + } + }, + "RowChildren": { + "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.", + "anyOf": [ + { + "$ref": "#/$defs/FinalWidget" + }, + { + "type": "object", + "properties": { + "child": { + "type": "array", + "items": { + "$ref": "#/$defs/FinalWidget" + } + }, + "ratio": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "maximum": 65535, + "minimum": 0 + } + }, + "required": [ + "child" + ] + } + ] + }, + "SortOrder": { + "description": "Denotes the sort order.", + "type": "string", + "enum": [ + "Ascending", + "Descending" + ] + }, + "StringOrNum": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + ] + }, + "StyleConfig": { + "description": "Style-related configs.", + "type": "object", + "properties": { + "battery": { + "description": "Styling for the battery widget.", + "anyOf": [ + { + "$ref": "#/$defs/BatteryStyle" + }, + { + "type": "null" + } + ] + }, + "cpu": { + "description": "Styling for the CPU widget.", + "anyOf": [ + { + "$ref": "#/$defs/CpuStyle" + }, + { + "type": "null" + } + ] + }, + "disk_io_graph": { + "description": "Styling for the disk I/O graph widget.", + "anyOf": [ + { + "$ref": "#/$defs/DiskIoGraphStyle" + }, + { + "type": "null" + } + ] + }, + "graphs": { + "description": "Styling for graph widgets.", + "anyOf": [ + { + "$ref": "#/$defs/GraphStyle" + }, + { + "type": "null" + } + ] + }, + "memory": { + "description": "Styling for the memory widget.", + "anyOf": [ + { + "$ref": "#/$defs/MemoryStyle" + }, + { + "type": "null" + } + ] + }, + "network": { + "description": "Styling for the network widget.", + "anyOf": [ + { + "$ref": "#/$defs/NetworkStyle" + }, + { + "type": "null" + } + ] + }, + "tables": { + "description": "Styling for table widgets.", + "anyOf": [ + { + "$ref": "#/$defs/TableStyle" + }, + { + "type": "null" + } + ] + }, + "temp_graph": { + "description": "Styling for the temperature graph widget.", + "anyOf": [ + { + "$ref": "#/$defs/TempGraphStyle" + }, + { + "type": "null" + } + ] + }, + "theme": { + "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.", + "type": [ + "string", + "null" + ] + }, + "widgets": { + "description": "Styling for general widgets.", + "anyOf": [ + { + "$ref": "#/$defs/WidgetStyle" + }, + { + "type": "null" + } + ] + } + } + }, + "TableGap": { + "type": "string", + "enum": [ + "none", + "space", + "line" + ] + }, + "TableStyle": { + "description": "General styling for table widgets.", + "type": "object", + "properties": { + "headers": { + "description": "Text styling for table headers.", + "anyOf": [ + { + "$ref": "#/$defs/TextStyleConfig" + }, + { + "type": "null" + } + ] + } + } + }, + "TempConfig": { + "description": "Temperature configuration.", + "type": "object", + "properties": { + "default_sort": { + "description": "The default sort column.", + "anyOf": [ + { + "$ref": "#/$defs/TempWidgetColumn" + }, + { + "type": "null" + } + ] + }, + "sensor_filter": { + "description": "A filter over the sensor names.", + "anyOf": [ + { + "$ref": "#/$defs/IgnoreList" + }, + { + "type": "null" + } + ] + }, + "sort_order": { + "description": "The default sort order. Defaults to ascending.", + "$ref": "#/$defs/SortOrder" + } + } + }, + "TempGraphConfig": { + "description": "Temperature graph configuration.", + "type": "object", + "properties": { + "legend_position": { + "description": "The location of the graph's legend.", + "type": [ + "string", + "null" + ], + "default": null + }, + "max_temp": { + "description": "An upper temperature value for the graph; entries higher than this will\nbe hidden. If not set, there is no limit.\n\nIs in the configured temperature unit.", + "type": [ + "number", + "null" + ], + "format": "double", + "default": null + }, + "sensor_filter": { + "description": "A filter over the sensor names.", + "anyOf": [ + { + "$ref": "#/$defs/IgnoreList" + }, + { + "type": "null" + } + ] + } + } + }, + "TempGraphStyle": { + "description": "Styling specific to the temperature graph widget.", + "type": "object", + "properties": { + "temp_graph_colour_styles": { + "description": "Colour of each temperature sensor's graph line. Read in order.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/$defs/ColourStr" + } + } + } + }, + "TempWidgetColumn": { + "type": "string", + "enum": [ + "Sensor", + "Temp", + "Temperature", + "sensor", + "temp", + "temperature" + ] + }, + "TextStyleConfig": { + "description": "A style for text.", + "anyOf": [ + { + "$ref": "#/$defs/ColourStr" + }, + { + "type": "object", + "properties": { + "bg_colour": { + "description": "A built-in ANSI colour, RGB hex, or RGB colour code.", + "anyOf": [ + { + "$ref": "#/$defs/ColourStr" + }, + { + "type": "null" + } + ] + }, + "bold": { + "description": "Whether to make this text bolded or not. If not set,\nwill default to built-in defaults.", + "type": [ + "boolean", + "null" + ] + }, + "colour": { + "description": "A built-in ANSI colour, RGB hex, or RGB colour code.", + "anyOf": [ + { + "$ref": "#/$defs/ColourStr" + }, + { + "type": "null" + } + ] + }, + "italics": { + "description": "Whether to make this text italicized or not. If not set,\nwill default to built-in defaults.", + "type": [ + "boolean", + "null" + ] + } + } + } + ] + }, + "WidgetBarType": { + "description": "The type of character used to fill in bars, such as the ones used by the\nbasic CPU and memory widgets.", + "oneOf": [ + { + "description": "Fill bars with pipe characters (`|`).", + "type": "string", + "const": "pipe" + }, + { + "description": "Fill bars with block characters (`█`, `▉`, etc.).", + "type": "string", + "const": "block" + }, + { + "description": "Fill bars with square characters (`■`).", + "type": "string", + "const": "square" + } + ] + }, + "WidgetBorderType": { + "type": "string", + "enum": [ + "default", + "rounded", + "double", + "thick" + ] + }, + "WidgetStyle": { + "description": "General styling for generic widgets.", + "type": "object", + "properties": { + "bar_type": { + "description": "What character to fill in bars with, such as the ones used by the basic\nCPU and memory widgets.", + "anyOf": [ + { + "$ref": "#/$defs/WidgetBarType" + }, + { + "type": "null" + } + ] + }, + "bg_colour": { + "description": "Background colour for widgets.", + "anyOf": [ + { + "$ref": "#/$defs/ColourStr" + }, + { + "type": "null" + } + ] + }, + "border_colour": { + "description": "The colour of the widgets' borders.", + "anyOf": [ + { + "$ref": "#/$defs/ColourStr" + }, + { + "type": "null" + } + ] + }, + "disabled_text": { + "description": "Text styling for text when representing something that is disabled.", + "anyOf": [ + { + "$ref": "#/$defs/TextStyleConfig" + }, + { + "type": "null" + } + ] + }, + "selected_border_colour": { + "description": "The colour of a widget's borders when the widget is selected.", + "anyOf": [ + { + "$ref": "#/$defs/ColourStr" + }, + { + "type": "null" + } + ] + }, + "selected_text": { + "description": "Text styling for text when representing something that is selected.", + "anyOf": [ + { + "$ref": "#/$defs/TextStyleConfig" + }, + { + "type": "null" + } + ] + }, + "text": { + "description": "Text styling for text in general.", + "anyOf": [ + { + "$ref": "#/$defs/TextStyleConfig" + }, + { + "type": "null" + } + ] + }, + "thread_text": { + "description": "Text styling for text when representing process threads. Only usable\non Linux at the moment.", + "anyOf": [ + { + "$ref": "#/$defs/TextStyleConfig" + }, + { + "type": "null" + } + ] + }, + "widget_border_type": { + "description": "Widget borders type.", + "anyOf": [ + { + "$ref": "#/$defs/WidgetBorderType" + }, + { + "type": "null" + } + ] + }, + "widget_title": { + "description": "Text styling for a widget's title.", + "anyOf": [ + { + "$ref": "#/$defs/TextStyleConfig" + }, + { + "type": "null" + } + ] + } + } + }, + "row": { + "description": "Represents a row. This has a length of some sort (optional) and a vector\nof children.", + "type": "object", + "properties": { + "child": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/$defs/RowChildren" + } + }, + "ratio": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "maximum": 65535, + "minimum": 0 + } + } + } + } +} diff --git a/scripts/schema_gen/Cargo.lock b/scripts/schema_gen/Cargo.lock index 1cd7aa10..94d00e04 100644 --- a/scripts/schema_gen/Cargo.lock +++ b/scripts/schema_gen/Cargo.lock @@ -4,9 +4,9 @@ version = 4 [[package]] name = "aho-corasick" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" dependencies = [ "memchr", ] @@ -90,15 +90,15 @@ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "base64" -version = "0.22.1" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" [[package]] name = "bitflags" -version = "2.13.0" +version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" [[package]] name = "block2" @@ -129,7 +129,7 @@ dependencies = [ "indoc", "itertools 0.15.0", "libc", - "mach2 0.7.0", + "mach2", "nvml-wrapper", "ratatui", "ratatui-core", @@ -174,21 +174,21 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" [[package]] name = "cfg_aliases" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" [[package]] name = "clap" -version = "4.6.6" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "473c7e07f409a8d772161724aa8db6a765a2532a70f9667eeb7b49d3d02fbdca" +checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946" dependencies = [ "clap_builder", "clap_derive", @@ -196,9 +196,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.6.6" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b48fea5a88e9ae728a2dcbedbfc0e730f7d60da42e1cb049a83c9fb8b789889" +checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d" dependencies = [ "anstream", "anstyle", @@ -209,9 +209,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.6.9" +version = "4.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be2ad0423bdbbb0e25bc89add796f3559706d4a95e1bc98e4d9662a957b6a19" +checksum = "037e2a1a92236d0aff7e845093f64661d6df4c02c9fcc61a60e9e1d736fa392f" dependencies = [ "clap", ] @@ -228,9 +228,9 @@ dependencies = [ [[package]] name = "clap_complete_nushell" -version = "4.6.1" +version = "4.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "933b05d5d83ff65fd7eaf5d106c792f2264908790a2642aca57429767b762ce2" +checksum = "ffb66bc82eb9c92b1727310ae2c5868df22ae7cf46185bc5c544a4fa71955e49" dependencies = [ "clap", "clap_complete", @@ -238,27 +238,27 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.6.4" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d012d2b9d65aca7f18f4d9878a045bc17899bba951561ba5ec3c2ba1eed9a061" +checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0" dependencies = [ "heck", "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.6", ] [[package]] name = "clap_lex" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" +checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486" [[package]] name = "clap_mangen" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c630ddc90572b3d9abd3f887f0007b4e048faf5c5a59ae607f8ac1c5e3790873" +checksum = "211d617eaa4b735c96c9e0228fcbdb5120ef623f2b8cb67ffb84c3e02dbc28a4" dependencies = [ "clap", "roff", @@ -371,12 +371,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.23.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +checksum = "ed17f5901b6630b993ca003def43f2f8ef4014fc13b047b57aad617ff32bc2ec" dependencies = [ - "darling_core 0.23.0", - "darling_macro 0.23.0", + "darling_core 0.24.1", + "darling_macro 0.24.1", ] [[package]] @@ -390,20 +390,20 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] name = "darling_core" -version = "0.23.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +checksum = "6837e2cf7485aaae18f86181d2f0e9a7ed297a025e220aeabf63fdebd3a2ddff" dependencies = [ "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.118", + "syn 3.0.6", ] [[package]] @@ -414,18 +414,18 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core 0.20.11", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] name = "darling_macro" -version = "0.23.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +checksum = "2ac7135c3ef02b2f7833bbeb1be5ba7f966dcde8a87c6b87f65a778d71a02785" dependencies = [ - "darling_core 0.23.0", + "darling_core 0.24.1", "quote", - "syn 2.0.118", + "syn 3.0.6", ] [[package]] @@ -453,7 +453,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -506,9 +506,9 @@ checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "either" -version = "1.16.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" +checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34" [[package]] name = "enum-as-inner" @@ -519,7 +519,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -538,12 +538,6 @@ dependencies = [ "windows-sys", ] -[[package]] -name = "fast-srgb8" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1" - [[package]] name = "fnv" version = "1.0.7" @@ -556,17 +550,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" -[[package]] -name = "getrandom" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - [[package]] name = "hashbrown" version = "0.16.1" @@ -597,9 +580,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "humantime" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" +checksum = "15cdd26707701c53297e2fa6afb323d55fbc1d0810c3aec078ae3ef0424c3c15" [[package]] name = "ident_case" @@ -609,9 +592,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indexmap" -version = "2.14.0" +version = "2.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" dependencies = [ "equivalent", "hashbrown 0.17.1", @@ -628,15 +611,15 @@ dependencies = [ [[package]] name = "instability" -version = "0.3.12" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eb2d60ef19920a3a9193c3e371f726ec1dafc045dac788d0fb3704272458971" +checksum = "4c3b5acc1e2fd9375041a388da33d1eb8aed5f7a8c0dd3543e3ea2805adfbe20" dependencies = [ - "darling 0.23.0", + "darling 0.24.1", "indoc", "proc-macro2", "quote", - "syn 2.0.118", + "syn 3.0.6", ] [[package]] @@ -677,7 +660,7 @@ checksum = "bde5057d6143cc94e861d90f591b9303d6716c6b9602309150bd068853c10899" dependencies = [ "hashbrown 0.16.1", "portable-atomic", - "thiserror 2.0.18", + "thiserror 2.0.21", ] [[package]] @@ -710,18 +693,18 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libredox" -version = "0.1.17" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f02ab6bace2054fb888a3c16f990117b579d14a3088e472d63c6011fa185c9d3" +checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" dependencies = [ "libc", ] [[package]] name = "line-clipping" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f50e8f47623268b5407192d26876c4d7f89d686ca130fdc53bced4814cd29f8" +checksum = "e752191d037c44ad111a8caa762921926658402f01cc1253f7bef2020ece4f5e" dependencies = [ "bitflags", ] @@ -749,25 +732,19 @@ dependencies = [ [[package]] name = "log" -version = "0.4.33" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" +checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" [[package]] name = "lru" -version = "0.18.0" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a860605968fce16869fd239cf4237a82f3ac470723415db603b0e8b6c8d4fb9" +checksum = "ef9ac18847474e638e3702b76c65d4eb93428471a74778ef0f1be711717f89b5" dependencies = [ "hashbrown 0.17.1", ] -[[package]] -name = "mach2" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dae608c151f68243f2b000364e1f7b186d9c29845f7d2d85bd31b9ad77ad552b" - [[package]] name = "mach2" version = "0.7.0" @@ -776,15 +753,15 @@ checksum = "b0d28e293f2b8c9d2b2d1c0193bd3c1cbdc0d2cf396888dc01162f7cf9d6c3f3" [[package]] name = "memchr" -version = "2.8.2" +version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" [[package]] name = "mio" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda" +checksum = "4b18443e9c262bfe8fa82f51666e2642c53393f7e5c27b3e1aeab922cff5b9d8" dependencies = [ "libc", "log", @@ -937,26 +914,35 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "palette" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cbf71184cc5ecc2e4e1baccdb21026c20e5fc3dcf63028a086131b3ab00b6e6" +checksum = "ddeed8580d347d2abf3dcf06a5f0b3dc020258338526b277847cd4248a70fc64" dependencies = [ "approx", - "fast-srgb8", "libm", "palette_derive", + "palette_math", ] [[package]] name = "palette_derive" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5030daf005bface118c096f510ffb781fc28f9ab6a32ab224d8631be6851d30" +checksum = "88537020289b719d81be994ccf1bbf4990f477e2f69ee52fe3e45f43a02e56be" dependencies = [ "by_address", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", +] + +[[package]] +name = "palette_math" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e6eb142958d64335fb0e345c5b9ead2ecd6fc438c307e9d7d3c4fd428dbaf12" +dependencies = [ + "libm", ] [[package]] @@ -984,9 +970,9 @@ dependencies = [ [[package]] name = "plist" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da1d65da6dd5d1e44199ac0f58712d241c0f439f80adea8924d832384087f85" +checksum = "2896bade328c13f7042a297ea5ac5b0951f6cf989dea5f32c2fd98da398195cb" dependencies = [ "base64", "indexmap", @@ -997,9 +983,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.13.1" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" +checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" [[package]] name = "powerfmt" @@ -1009,27 +995,27 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "proc-macro2" -version = "1.0.106" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" dependencies = [ "unicode-ident", ] [[package]] name = "quick-xml" -version = "0.41.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" +checksum = "41b1177fdf999d2321d3fb46ff47159d9c1fb9ad66a4879f8c50a0b504615e9b" dependencies = [ "memchr", ] [[package]] name = "quote" -version = "1.0.46" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" dependencies = [ "proc-macro2", ] @@ -1063,7 +1049,7 @@ dependencies = [ "palette", "serde", "strum", - "thiserror 2.0.18", + "thiserror 2.0.21", "unicode-segmentation", "unicode-truncate", "unicode-width", @@ -1112,33 +1098,32 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" +checksum = "60dc65c0ff1a7ae1294b0c67b9f14baf70b644404010370171787bfac1038fc0" dependencies = [ - "getrandom", "libredox", - "thiserror 2.0.18", + "thiserror 2.0.21", ] [[package]] name = "ref-cast" -version = "1.0.25" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" +checksum = "7e440fb4e4b4147295338efb76001ab9e4efc0e5839df2c47fc5ac2381d365c3" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.25" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" +checksum = "92ecd8964f8453721699a1ed72037b0db49ce2f5a5138486ee89bed6f67cdf3a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 3.0.6", ] [[package]] @@ -1155,9 +1140,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.16" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdb36bda0c880c5931cdc7a2bcdc8ba4556847b9d912bca70bc94708711ad" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" dependencies = [ "aho-corasick", "memchr", @@ -1193,9 +1178,9 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d" dependencies = [ "bitflags", "errno", @@ -1206,9 +1191,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" [[package]] name = "ryu" @@ -1260,7 +1245,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 3.0.3", + "syn 3.0.6", ] [[package]] @@ -1277,9 +1262,9 @@ checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" [[package]] name = "serde" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" dependencies = [ "serde_core", "serde_derive", @@ -1287,22 +1272,22 @@ dependencies = [ [[package]] name = "serde_core" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 3.0.6", ] [[package]] @@ -1313,7 +1298,7 @@ checksum = "f852137cce035d6a4df67ccce505ff6b3e9fd3a10e3e52b24dc71e650bb1a9bd" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.6", ] [[package]] @@ -1371,20 +1356,20 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.15.2" +version = "1.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" +checksum = "f9395f0f0eee849a9b707b2f06bb92a6a422090e2123bb2ef8e87a0e61892a8e" [[package]] name = "starship-battery" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e919b7ecd99f2d5ed9efdc8d242ae93d91684181a782dadcbcd72079930155f9" +checksum = "a39fd9579fda6d69713f9a2ce793e4488a25a21583006ec7197c5eb73e110bf7" dependencies = [ "cfg-if", "lazycell", "libc", - "mach2 0.6.0", + "mach2", "nix", "num-traits", "objc2-core-foundation", @@ -1424,14 +1409,14 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] name = "syn" -version = "2.0.118" +version = "2.0.119" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" dependencies = [ "proc-macro2", "quote", @@ -1440,9 +1425,9 @@ dependencies = [ [[package]] name = "syn" -version = "3.0.3" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee" dependencies = [ "proc-macro2", "quote", @@ -1459,7 +1444,7 @@ dependencies = [ "byteorder", "enum-as-inner", "libc", - "thiserror 2.0.18", + "thiserror 2.0.21", "walkdir", ] @@ -1499,11 +1484,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.18" +version = "2.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" dependencies = [ - "thiserror-impl 2.0.18", + "thiserror-impl 2.0.21", ] [[package]] @@ -1514,25 +1499,25 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] name = "thiserror-impl" -version = "2.0.18" +version = "2.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 3.0.6", ] [[package]] name = "time" -version = "0.3.51" +version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c17d80feb7334b40c484e45ed1a5273dfd8bfda537c3be2e74a06a6686f327" +checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" dependencies = [ "deranged", "libc", @@ -1552,9 +1537,9 @@ checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" [[package]] name = "time-macros" -version = "0.2.30" +version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcef1a61bdb119096e153208ec5cbec23944ce8bca13be5c7f60c634f7403935" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" dependencies = [ "num-conv", "time-core", @@ -1577,9 +1562,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.25.12+spec-1.1.0" +version = "0.25.15+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2153edc6955a6c354fad8f5efd38b6a8769bdccf9fe50f8e1329f81b0baa5d7" +checksum = "1340ea94a5856333492c9064b02c778b191dd2c853778d9609debdcdfea3a614" dependencies = [ "indexmap", "serde_core", @@ -1592,18 +1577,18 @@ dependencies = [ [[package]] name = "toml_parser" -version = "1.1.2+spec-1.1.0" +version = "1.1.3+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" +checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56" dependencies = [ "winnow", ] [[package]] name = "toml_writer" -version = "1.1.1+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" +checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2" [[package]] name = "typenum" @@ -1623,9 +1608,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.24" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" +checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954" [[package]] name = "unicode-segmentation" @@ -1766,7 +1751,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -1777,7 +1762,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -1834,9 +1819,9 @@ dependencies = [ [[package]] name = "winnow" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0592e1c9d151f854e6fd382574c3a0855250e1d9b2f99d9281c6e6391af352f1" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" dependencies = [ "memchr", ] @@ -1850,11 +1835,11 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] name = "zmij" -version = "1.0.21" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/src/collection/batteries.rs b/src/collection/batteries.rs index 6a0ce7dc..788aeab3 100644 --- a/src/collection/batteries.rs +++ b/src/collection/batteries.rs @@ -28,6 +28,7 @@ pub enum BatteryState { }, Empty, Full, + Paused, Unknown, } @@ -39,6 +40,7 @@ impl BatteryState { BatteryState::Discharging { .. } => "Discharging", BatteryState::Empty => "Empty", BatteryState::Full => "Full", + BatteryState::Paused => "Paused", BatteryState::Unknown => "Unknown", } } @@ -91,6 +93,7 @@ pub fn refresh_batteries(manager: &Manager, batteries: &mut [Battery]) -> Vec BatteryState::Empty, State::Full => BatteryState::Full, + State::Paused => BatteryState::Paused, }, }) } else {