]> git.seodisparate.com - swaybar_info/commitdiff
Update help text and README.md
authorStephen Seo <seo.disparate@gmail.com>
Sun, 11 Dec 2022 12:55:27 +0000 (21:55 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Sun, 11 Dec 2022 12:55:27 +0000 (21:55 +0900)
README.md
src/args.rs

index 104fde9cf1345878c9565e7dfc94a6d69fd73d6e..023dd1f4e0b4787ba4e5cfe5d88401d6688e29cf 100644 (file)
--- a/README.md
+++ b/README.md
@@ -17,14 +17,15 @@ tiling Wayland compositor](https://swaywm.org).
 ## Help Text
 
     Usage:
-      -h | --help                                       Prints help
-      --netdev=<device_name>                            Check network traffic on specified device
-      --netdev_width=<width>                            Sets the min-width of the netdev output (default 10)
-      --netgraph_max_bytes=<bytes>                      Enable "graph" output when polling network traffic
-      --interval-sec=<seconds>                          Output at intervals of <seconds> (default 5)
-      --acpi-builtin                                    Use "acpi -b" built-in fetching (battery info, with color)
-      --regex-cmd=<cmd>[SPLIT]<args...>[SPLIT]<regex>   Use an output of a command as a metric
-      --time-format=<date format string>                Set the format string for the date
+      -h | --help                                              Prints help
+      --netdev=<device_name>                           Check network traffic on specified device
+      --netdev_width=<width>                           Sets the min-width of the netdev output (default 10)
+      --netgraph_max_bytes=<bytes>                             Enable "graph" output when polling network traffic
+                                                                 (Set to "dynamic" instead of a byte count for dynamic sizing)
+      --interval-sec=<seconds>                         Output at intervals of <seconds> (default 5)
+      --acpi-builtin                                   Use "acpi -b" built-in fetching (battery info, with color)
+      --regex-cmd=<cmd>[SPLIT]<args...>[SPLIT]<regex>  Use an output of a command as a metric
+      --time-format=<date format string>                       Set the format string for the date
 
 ## Usage
 
@@ -107,6 +108,10 @@ characters](https://en.wikipedia.org/wiki/Block_Elements)). Thus, this outputs
 a history graph of network traffic. A sane value for `<bytes>` can be 1048576,
 which is 1 MiB.
 
+Specify "dynamic" instead of a bytecount (such as
+`--netgraph_max_bytes=dynamic`) to have the graph dynamically resize based on
+the maximum amount of bytes transferred in an interval.
+
 ## Dependencies
 
 Uses [`serde_json`](https://crates.io/crates/serde_json),
index 2c548e248cfb704866bec90f5df0bcd1445dd7fe..babfc515ae46d74f74b278e608612f31afdf784a 100644 (file)
@@ -64,6 +64,9 @@ pub fn print_usage() {
     stderr_handle
         .write_all(b"  --netgraph_max_bytes=<bytes>\t\t\t\tEnable \"graph\" output when polling network traffic\n")
         .ok();
+    stderr_handle
+        .write_all(b"                              \t\t\t\t  (Set to \"dynamic\" instead of a byte count for dynamic sizing)\n")
+        .ok();
     stderr_handle
         .write_all(
             b"  --interval-sec=<seconds>\t\t\t\tOutput at intervals of <seconds> (default 5)\n",