24 Commits

Author SHA1 Message Date
de6bef6e36 More datetime changes
* Accept the format string as Into<String> rather than String to allow
  &str to be provided.
* set_colors accepts Into<Vec<TimeColor>> rather than &[TimeColor]. The
  function needs a Vec<TimeColor>. Previously it would unconditionally
  clone the slice into a Vec, now it can accept a Vec if the user provides
  one and avoid an allocation in those cases (while still cloning a slice
  if that's what the user provides).
* DateTime::colors was an Option<Vec<TimeColor>> it's now simply a
  Vec<TimeColor>. There was no difference in logic between a None and an
  empty Vec so the code could be simplified by removing the Option.
* No longer allocate a String when formatting the time.
* Collapse the logic setting color. Calculating whether to set a color
  and storing the result in Option<ColorRGB> only to then set data.color
  if the Option is Some, can be collapsed to simply set data.color if the
  configuration dictates.
2019-10-01 11:27:06 -07:00
faae3bebca Have DateTimeWidget include the time zone in its type. 2019-10-01 08:49:09 -07:00
10c7dcdeab Read all CPUs in one widget. 2019-09-26 21:57:42 -07:00
a1cdec0a24 Make clock time large and bold. 2019-09-24 15:06:46 -07:00
3ae58d42aa Mark really early times as red too. More relevant for BST. 2019-09-23 16:20:15 -07:00
4790d35fa7 Do time color calculation with TZ aware time value. 2019-09-23 13:43:58 -07:00
c4920a1e6e Set warning colors for British time too. 2019-09-23 13:18:14 -07:00
f704d9cdf1 Fix comment typo. 2019-09-23 13:17:23 -07:00
f34b21e155 Use proper CPU widget at work. 2019-09-23 07:41:49 -07:00
ccd9cf5002 Color CPU graph based on usage; green idle, red full utilization. 2019-09-22 10:26:33 -07:00
6f6fd13b94 Refresh network status at 1 second interval. 2019-09-22 10:26:19 -07:00
6b2200d640 Draw historic CPU usage.
Version spark library and extend.
2019-09-22 09:57:32 -07:00
dcc1fdcd83 Copy of spark crate. 2019-09-22 08:36:07 -07:00
803ab94d22 Initial commit of CpuWidget. 2019-09-22 07:59:07 -07:00
93229efb6e Remove debug logging. 2019-09-22 07:34:44 -07:00
14b58f766a Set colors for clock in work profile. 2019-09-21 22:11:31 -07:00
4cb50597e1 Allow time color to change based on time of day. 2019-09-21 22:10:03 -07:00
2d054bb9a1 Add history to TX/RX status. 2019-09-21 21:20:01 -07:00
f09145eccd Move datetime to widgets subdir and import i3monkit network. 2019-09-21 20:49:27 -07:00
1a2ad57826 Split binaries into work and home version. 2019-09-21 20:48:40 -07:00
cbb709afda Allow DateTimeWidget to use timezones and specify format. 2019-09-21 20:15:41 -07:00
df5308e3dd Working on multiple clock support. 2019-09-21 18:00:16 -07:00
fd4d85a561 Remove broken widgets and allow NIC to be set with flag. 2019-09-21 11:32:14 -07:00
5d509faff3 Minimal i3 status app. 2019-09-21 11:03:46 -07:00