11 Commits

Author SHA1 Message Date
4819128bda Cleanup lint 2023-05-06 07:46:50 -07:00
9c94122d1d Address many clippy lints. 2021-12-12 10:00:09 -08:00
62b53199b1 Add power supply widget based loosely on https://github.com/hastinbe/i3blocks-battery-plus/blob/master/battery-plus 2021-12-12 09:51:59 -08:00
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
10c7dcdeab Read all CPUs in one widget. 2019-09-26 21:57:42 -07:00
f704d9cdf1 Fix comment typo. 2019-09-23 13:17:23 -07:00
803ab94d22 Initial commit of CpuWidget. 2019-09-22 07:59:07 -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
1a2ad57826 Split binaries into work and home version. 2019-09-21 20:48:40 -07:00