From 25bd848842400cbf0cb7b130d606657b50b0e6b6 Mon Sep 17 00:00:00 2001 From: Jiri Kalvoda <jirikalvoda@kam.mff.cuni.cz> Date: Fri, 12 Aug 2022 21:33:50 +0200 Subject: [PATCH] Add ModuleWrappers supprot and WrapperColor and WrapperDefaultColor: Documentation --- README.md | 10 ++++++++++ sample.conf | 15 +++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/README.md b/README.md index b6ead55..67a8f06 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,16 @@ then it must have `[ParserName(string)]` attribute. Parser can be configured via `Init` function. In such case, it must return part of bar on each call of `Parse` method. +Module wrappers +--------------- + +In the configuration file, user can add one or more module wrappers as options. +By convention these options start with `_`. +Module wrapper is able change behavior of the Module as it has access to any +communication between Module and Status Bar (`ModuleParent` interface). + +Wrappers are created by `StatusBar.addStandardModuleWrappers`. + Output formats -------------- diff --git a/sample.conf b/sample.conf index 65e8684..6fe2e40 100644 --- a/sample.conf +++ b/sample.conf @@ -290,6 +290,21 @@ timeout = 10 # <time> default 10 # Timeout of each HTTP request. +# Options for all modules +# ======================= + +[constant] +text = Hi +# Begin of some module for showing options + +_color = blue +# <color> +# Overwrite color of this module output + +_default_color = red +# <color> +# Set color if module don't set any + # Parsers: # ======== -- GitLab