summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorSamuele Esposito <36164633+esposm03@users.noreply.github.com>2020-05-31 19:43:08 +0200
committerGitHub <noreply@github.com>2020-05-31 19:43:08 +0200
commitfe2b3d491e8d38df62c4585542e17665a790a59e (patch)
treea86424e41b5bf0baa75f3d8b10b3452b1fa8e50a /docs
parentab1c3d1c5431a4fbc9a7e2d268feb28c0c2b8e5f (diff)
feat(time): Show module with time range (#992)
* Creation of range field in TimeConfig * time_range parsing * Hide time module if outside of time_range * Tidying of code, and properly handling more cases * is_inside_time_range function * Tests and fmt * Update docs * The configuration needs the 24-hours format * Fix clippy errors
Diffstat (limited to 'docs')
-rw-r--r--docs/config/README.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/config/README.md b/docs/config/README.md
index 1d331f00d..d47df257d 100644
--- a/docs/config/README.md
+++ b/docs/config/README.md
@@ -1327,11 +1327,12 @@ To enable it, set `disabled` to `false` in your configuration file.
| Variable | Default | Description |
| ----------------- | --------------- | ------------------------------------------------------------------------------------------------------------------- |
-| `use_12hr` | `false` | Enables 12 hour formatting |
+| `use_12hr` | `false` | Enables 12 hour formatting. |
| `format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. |
-| `style` | `"bold yellow"` | The style for the module time |
+| `style` | `"bold yellow"` | The style for the module time. |
| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. |
| `disabled` | `true` | Disables the `time` module. |
+| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
If `use_12hr` is `true`, then `format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`.
Manually setting `format` will override the `use_12hr` setting.
@@ -1345,6 +1346,7 @@ Manually setting `format` will override the `use_12hr` setting.
disabled = false
format = "🕙[ %T ]"
utc_time_offset = "-5"
+time_range = "10:00:00-14:00:00"
```
## Username