From 190ed0639af56edfbea01e8937ac8f99743c7033 Mon Sep 17 00:00:00 2001 From: 2ndbeam <2ndbeam@disroot.org> Date: Fri, 19 Sep 2025 00:30:55 +0300 Subject: [PATCH] Added config example --- README.md | 12 +++++------- config.toml | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 7 deletions(-) create mode 100644 config.toml diff --git a/README.md b/README.md index be32e0b..563edcf 100644 --- a/README.md +++ b/README.md @@ -30,18 +30,16 @@ Run `cargo build --release` ## Usage -Just run `aliveline` by any preferred way. +Just run `aliveline` by any preferred way, for example: +``` +$ ./aliveline +``` ## Configuration Aliveline tries to find config at `$XDG_CONFIG_DIR/aliveline/config.toml`. If config isn't found, or `$XDG_CONFIG_DIR` is not set, Aliveline uses default values. -You can configure these values: -- `log_path` - - Type: `String` - - Default: `logs` - Path to directory where logs are located. - Path may be absolute or relative to config directory. +See the example [config.toml](http://2ndbeam.ru/git/2ndbeam/aliveline/src/branch/master/config.toml) for default values. ## Contribution You can contribute to Aliveline by creating issue on this repository, then we'll discuss it. diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..1bfb6b9 --- /dev/null +++ b/config.toml @@ -0,0 +1,53 @@ +# This is the default config for Aliveline. +# Note: All colors are of format 0xAARRGGBB + +# Path where logs are saved. May be relative to config dir or absolute. +log_path = "logs" + +# Colors used for events. For now Aliveline expects to have exactly 16 colors, but this is subject to change in future. +event_colors = [ + 0xff_97f9f9, + 0xff_a4def9, + 0xff_c1e0f7, + 0xff_cfbae1, + 0xff_c59fc9, + 0xff_4e3d42, + 0xff_c9d5b5, + 0xff_2d82b7, + 0xff_556f44, + 0xff_772e25, + 0xff_c44536, + 0xff_7c6a0a, + 0xff_babd8d, + 0xff_ffdac6, + 0xff_fa9500, + 0xff_eb6424 +] + +# Colors used for event colors. Aliveline expects it to have same size as events. +text_colors = [ + 0xff_000000, + 0xff_000000, + 0xff_000000, + 0xff_000000, + 0xff_000000, + 0xff_ffffff, + 0xff_000000, + 0xff_000000, + 0xff_000000, + 0xff_ffffff, + 0xff_000000, + 0xff_000000, + 0xff_000000, + 0xff_000000, + 0xff_000000, + 0xff_000000 +] + +[colors] +# Color behind the timeline +background = 0xFF_808080 +# Color of the base timeline +timeline = 0xFF_a9a9a9 +# Color of background text (timestamps, event names, etc.) +background_text = 0xFF_000000