diff --git a/README.md b/README.md index 67a8f06309836e7eea115b282067098c83caf09d..c63bcc188bbe06087bd4321dd9297013ebb5a797 100644 --- a/README.md +++ b/README.md @@ -38,9 +38,9 @@ Developer documentation Overview -------- -Main class of the program is `RootStatusBar`. This class will parse the configuration and then it start main loop. +The main class of the program is `RootStatusBar`. This class parses the configuration and then it starts the main loop. Main loop is responsible for constructing status bar and printing it. Output formats are defined in `RootStatusBar` -sub classes. Waiting for print the status bar could be interrupted from other threads. +sub classes. Waiting for print the status bar can be interrupted from other threads. Status bar block ---------------- @@ -50,8 +50,8 @@ Blocks correspond almost one to one to i3bar blocks. See i3bar protocol documentation: <https://i3wm.org/docs/i3bar-protocol.html> In addition to i3bar block there is `OnClick` member. -You can store there a function which will be called when somebody -clicks on the buttton. Function will receive `ClickEvent` as its only argument. +You can store a function there which is called whenever somebody +clicks on the buttton. Function receives `ClickEvent` as its only argument. Note that this function can be called from a different thread. Please write it thread safe. @@ -83,7 +83,7 @@ It is possible to use `ModuleParent` to schedule next render of the status bar (Schedule method). This function is thread safe. For module cooperation it is possible to use `ModuleParent.GetGlobal<T>`. -It will return an instance of `T` shared across all modules in status bar. +It returns an instance of `T` shared across all modules in status bar. `T` should implement `GlobalModuleResource` interface. There are methods which are called before and after status bar initialization and generation. For excepted behavior it is important to call `GetGlobal` from `Init`.