aboutsummaryrefslogtreecommitdiffstats
path: root/wavemon.h
diff options
context:
space:
mode:
Diffstat (limited to 'wavemon.h')
-rw-r--r--wavemon.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/wavemon.h b/wavemon.h
index 16580f7..969aa25 100644
--- a/wavemon.h
+++ b/wavemon.h
@@ -137,6 +137,7 @@ extern struct wavemon_conf {
/* Boolean values */
int check_geometry, /* ensure window is large enough */
cisco_mac, /* Cisco-style MAC addresses */
+ transparent_bg, /* Use terminal background instead of black */
override_bounds, /* override autodetection */
scan_sort_asc; /* direction of @scan_sort_order */
@@ -171,8 +172,9 @@ struct conf_item {
char **list; /* t_list: NULL-terminated array of strings */
int *dep; /* dependency */
+ bool hidden; /* only allow to set via wavemonrc */
- double min, /* value boundaries */
+ int min, /* value boundaries */
max,
inc; /* increment for value changes */
@@ -382,6 +384,21 @@ static inline char *byte_units(const double bytes)
return result;
}
+/* Integer units - similar to %g for float. */
+static inline char *int_counts(uint32_t count)
+{
+ static char result[0x10];
+
+ if (count < 1000)
+ sprintf(result, "%u", count);
+ else if (count < 1000000)
+ sprintf(result, "%uk", count/1000);
+ else
+ sprintf(result, "%.lg", (double)count);
+
+ return result;
+}
+
/**
* Compute exponentially weighted moving average
* @mavg: old value of the moving average