Skip to content

Commit b58dd8f

Browse files
committed
Add doc
1 parent 9b89ed5 commit b58dd8f

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

src/blocks/timewarrior.rs

+32
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
//! Time and information of the current timewarrior task
2+
//!
3+
//! Clicking left mouse stops or resumes the task
4+
//!
5+
//! # Configuration
6+
//!
7+
//! Key | Values | Default
8+
//! ----|--------|--------
9+
//! `interval` | Update interval in seconds | `30`
10+
//! `format` | A string to customise the output of the block. See placeholders. | `" $icon {$elapsed\|}"`
11+
//! `info` | The threshold of minutes the task turns into a info state | -
12+
//! `good` | The threshold of minutes the task turns into a good state | -
13+
//! `warning` | The threshold of minutes the task turns into a warning state | -
14+
//! `critical` | The threshold of minutes the task turns into a critical state | -
15+
//!
16+
//! Placeholder | Value | Type | Unit
17+
//! ------------|-------|------|------
18+
//! `icon` | A static icon | Icon | -
19+
//! `elapsed`| Elapsed time in format H:MM (Only present if task is active) | Text | -
20+
//! `tags` | Tags of the active task separated by space (Only present if task is active) | Text | -
21+
//! `annotation` | Annotation of the active task (Only present if task is active) | Text | -
22+
//!
23+
//! # Example
24+
//! ```toml
25+
//! [[block]]
26+
//! block = "timewarrior"
27+
//! format = " $icon {$tags.rot-str(8,1) $elapsed|}"
28+
//! ```
29+
//!
30+
//! # Icons Used
31+
//! - `tasks`
32+
133
use super::prelude::*;
234
use tokio::process::Command;
335
use chrono::DateTime;

0 commit comments

Comments
 (0)