From 6f7724ec6425944a09ba6bd14828d1e2fd5b3467 Mon Sep 17 00:00:00 2001 From: eplanet Date: Sat, 19 Nov 2016 15:02:10 +0100 Subject: Adding documentation for PR #179 (#182) --- man/i3status.man | 29 ++++++++++++++++++---- .../expected_output.txt | 1 - .../004-disk-low-threshold-format/i3status.conf | 12 --------- .../expected_output.txt | 1 + .../009-disk-low-threshold-format/i3status.conf | 12 +++++++++ 5 files changed, 37 insertions(+), 18 deletions(-) delete mode 100644 testcases/004-disk-low-threshold-format/expected_output.txt delete mode 100644 testcases/004-disk-low-threshold-format/i3status.conf create mode 100644 testcases/009-disk-low-threshold-format/expected_output.txt create mode 100644 testcases/009-disk-low-threshold-format/i3status.conf diff --git a/man/i3status.man b/man/i3status.man index 10b9d7f..65618dd 100644 --- a/man/i3status.man +++ b/man/i3status.man @@ -246,7 +246,8 @@ prefix_type. So, if you configure low_threshold to 2, threshold_type to "gbytes_avail", and prefix_type to "binary", and the remaining available disk space is below 2 GiB, it will be colored bad. If not specified, threshold_type is assumed to be "percentage_avail" and low_threshold to be set to 0, which -implies no coloring at all. +implies no coloring at all. You can customize the output format when below +low_threshold with format_below_threshold. You can define a different format with the option "format_not_mounted" which is used if the path does not exist or is not a mount point. Defaults to "". @@ -261,6 +262,8 @@ which is used if the path does not exist or is not a mount point. Defaults to "" *Example low_threshold*: +5+ +*Example format_below_threshold*: +Warning: %percentage_avail+ + *Example threshold_type*: +percentage_free+ === Run-watch @@ -375,7 +378,9 @@ FULL) is used. Gets the temperature of the given thermal zone. It is possible to define a max_threshold that will color the temperature red in case the -specified thermal zone is getting too hot. Defaults to 75 degrees C. +specified thermal zone is getting too hot. Defaults to 75 degrees C. The +output format when above max_threshold can be customized with +format_above_threshold. *Example order*: +cpu_temperature 0+ @@ -383,6 +388,8 @@ specified thermal zone is getting too hot. Defaults to 75 degrees C. *Example max_threshold*: +42+ +*Example format_above_threshold*: +Warning T above threshold: %degrees °C+ + *Example path*: +/sys/devices/platform/coretemp.0/temp1_input+ === CPU Usage @@ -392,11 +399,15 @@ Gets the percentual CPU usage from +/proc/stat+ (Linux) or +sysctl(3)+ It is possible to define a max_threshold that will color the load value red in case the CPU average over the last interval is getting -higher than the configured threshold. Defaults to 95. +higher than the configured threshold. Defaults to 95. The output +format when above max_threshold can be customized with +format_above_threshold. It is possible to define a degraded_threshold that will color the load value yellow in case the CPU average over the last interval is getting -higher than the configured threshold. Defaults to 90. +higher than the configured threshold. Defaults to 90. The ouput format +when above degraded threshold can be customized with +format_above_degraded_threshold. *Example order*: +cpu_usage+ @@ -404,14 +415,20 @@ higher than the configured threshold. Defaults to 90. *Example max_threshold*: +75+ +*Example format_above_threshold*: +Warning above threshold: %usage+ + *Example degraded_threshold*: +25+ +*Example format_above_degraded_threshold*: +Warning above degraded threshold: %usage+ + === Load Gets the system load (number of processes waiting for CPU time in the last 1, 5 and 15 minutes). It is possible to define a max_threshold that will color the load value red in case the load average of the last minute is -getting higher than the configured threshold. Defaults to 5. +getting higher than the configured threshold. Defaults to 5. The output +format when above max_threshold can be customized with +format_above_threshold. *Example order*: +load+ @@ -419,6 +436,8 @@ getting higher than the configured threshold. Defaults to 5. *Example max_threshold*: +"0,1"+ +*Example format_above_threshold*: +Warning: %1min %5min %15min+ + === Time Outputs the current time in the local timezone. diff --git a/testcases/004-disk-low-threshold-format/expected_output.txt b/testcases/004-disk-low-threshold-format/expected_output.txt deleted file mode 100644 index 6c5f96c..0000000 --- a/testcases/004-disk-low-threshold-format/expected_output.txt +++ /dev/null @@ -1 +0,0 @@ -BELOW_THRESHOLD diff --git a/testcases/004-disk-low-threshold-format/i3status.conf b/testcases/004-disk-low-threshold-format/i3status.conf deleted file mode 100644 index ef1e96f..0000000 --- a/testcases/004-disk-low-threshold-format/i3status.conf +++ /dev/null @@ -1,12 +0,0 @@ -general { - output_format = "none" -} - -order += "disk /" - -disk "/" { - format = "%used" - format_below_threshold = "BELOW_THRESHOLD" - low_threshold = 100 - threshold_type = "percentage_free" -} diff --git a/testcases/009-disk-low-threshold-format/expected_output.txt b/testcases/009-disk-low-threshold-format/expected_output.txt new file mode 100644 index 0000000..6c5f96c --- /dev/null +++ b/testcases/009-disk-low-threshold-format/expected_output.txt @@ -0,0 +1 @@ +BELOW_THRESHOLD diff --git a/testcases/009-disk-low-threshold-format/i3status.conf b/testcases/009-disk-low-threshold-format/i3status.conf new file mode 100644 index 0000000..ef1e96f --- /dev/null +++ b/testcases/009-disk-low-threshold-format/i3status.conf @@ -0,0 +1,12 @@ +general { + output_format = "none" +} + +order += "disk /" + +disk "/" { + format = "%used" + format_below_threshold = "BELOW_THRESHOLD" + low_threshold = 100 + threshold_type = "percentage_free" +} -- cgit v1.2.3