From dc18aaaf03e0957b5cfc4800a9ca3061bd25c958 Mon Sep 17 00:00:00 2001 From: Martin Bley Date: Thu, 26 Nov 2020 12:59:13 +0100 Subject: [PATCH] wrote documentation --- README.md | 63 +++++++++++++++++++++++++++++++++++++++++++- img/example_bar.png | Bin 0 -> 4098 bytes 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 img/example_bar.png diff --git a/README.md b/README.md index c3e4055..7eea933 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,64 @@ # i3status-custom-pim -Generates JSON output for use with _custom_ block of [i3status-rust](https://github.com/greshake/i3status-rust) +![example bar](img/example_bar.png) +`i3status-custom-pim` is a tool to output JSON content for users of the [pimutils](https://github.com/pimutils) + +- [khal](https://github.com/pimutils/khal) and +- [todoman](https://github.com/pimutils/todoman). + +The output can be used for the custom block of [i3status-rust](https://github.com/greshake/i3status-rust) to display events or due dates in the i3 status bar. + +## Requirements +In order to build a binary, you need the Rust language and the package manager `cargo`. And of course you need the pimutils [khal](https://github.com/pimutils/khal) and/or +[todoman](https://github.com/pimutils/todoman). Please refer to the documentation on the project pages in order to install and configure these tools. + +## Install +There are no packaged versions yet, so you have to compile `i3status-cutom-pim` yourself. +``` +$ cargo install --git https://github.com/theamma/i3status-custom-pim i3status-custom-pim +``` +By default, this will install the binary to `~/.cargo/bin/i3status-custom-pim`. Please make sure, this is in your $PATH or copy the binary to an appropriate location (like `/usr/local/bin`). + +You may also compile manually +``` +$ git clone https://github.com/theamma/i3status-custom-pim +$ cd i3status-custom-pim && cargo build --release +``` + +## Configuration +To add the blocks, add this to your i3status-rs configuration + +``` +[[block]] +block = "custom" +command = ''' i3status-custom-pim -k ''' +json = true + +[[block]] +block = "custom" +command = ''' i3status-custom-pim -t -i tasks -w 20160 -c 7200''' +json = true +``` + +Thresholds for *warning* or *critical* state can be given via commandline switches. In *warning* state the widget will change the background colour to orange, in *critical* state to red. + +Please run `i3status-custom-pim --help` for available options. +``` +i3status-custom-pim 0.1.0 +Martin Bley +Generates JSON output for use with custom block of i3status-rust. + +USAGE: + i3status-custom-pim [FLAGS] [OPTIONS] + +FLAGS: + -h, --help Prints help information + -k, --khal output khal events + -t, --todo output todos + -V, --version Prints version information + +OPTIONS: + -i, --icon the icon used (only names valid in i3status-rust) [default: calendar] + -c threshold for critical status in minutes [default: 15] + -w threshold for warning status in minutes [default: 60] +``` diff --git a/img/example_bar.png b/img/example_bar.png new file mode 100644 index 0000000000000000000000000000000000000000..03dbb398cc1aa0163d330d2b78400265f690629b GIT binary patch literal 4098 zcmV+d5dH6oP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 zVoOIv0RI600RN!9r;`8x01#tgPIdqQ20#D+1B3to0$2b5004trGVlNZ4_`?{K~#9! z?Ob_OR9Bk+?tN9SRw# ztLnS=ec!wHd-r$0``!BQ#r_%IO|pd40$|C@9g~jVID+c&q7xf&) zF2(G)dvCD#BZjJF(FmX`0*3;o#XEY6|87X^D565){^$x6i@epp)_A+3@eTlN%FYl8 z=t-prU{^s-RH*#-r%KJXsiS3=%hjvXu`G+J`;TduT$Y}wLYRwd`UVXRZJqb+BDAAm zWzOOhgrM?P%dyfcESb9bJRVP>RAP)-X1dIhwJ<(8MtSJ`RgO9`iFjRRsxnm0GHhd~ z_KLd2eKTUApkPUATzCiobn6Wl>KaT_bt5i3gxLh$Om?Z$g2NH28njEeaJNagUVi92x zX(sq}=a?g3q8Jv)QI>aSrgb@x~FOxumL=`*Mn+lu8AU^5Fr)2rXFo&AGSp+Kbwn>bIjcIgB(KPM$=Yfk2YlJc3k>`$jlf~1nCS1tE& z3Cq6syU!+agpj7Y`}D1Mwa*l+oLJLhwVt?qZP;iEkp=EtzsAL|XRcOr+|2F``SL*N zuMd4m0KT_r?VgQmKmFpgH~IGb+>6)i)omSr|Lo=kF;P!Gvj`D-Um}X7Jj~B#f&kzy zLAx9ega)58_p`jl37ozfv#T+yCJ2~mnYJPPUTDl+o`>Y+$H&jjpe;dC$>N0A3w4dp zQOEli`%o3*vJ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