From 34bc748b4dd1b59933e8feb2311f8200843e0558 Mon Sep 17 00:00:00 2001 From: philer Date: Mon, 27 Mar 2023 22:12:10 +0200 Subject: [PATCH] Update README --- README.md | 4 ++-- src/widget.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c22aa83..2cab46c 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ will assign an automatic amount of space, split evenly between this and other fl The following Widget classes are currently available: * **`Widget`** the base class - Does nothing by itself. -* **`Rows`** a container for multiple widgets to be rendered in a vertical stack - It is useful to subclass this in order to create compound widgets with a combined `:update()`. +* **`Rows`** a container for multiple widgets to be rendered in a vertical stack - It can also be useful to subclass this in order to create composite widgets with a combined `:update()` (see the implementation of `Drive` as an example). * **`Columns`** like `Rows` but horizontal * **`Filler`** Leave some empty space. Can also wrap another widget to restrict its size. * **`Frame`** Provides background color, border, padding and margin for other Widgets. @@ -69,7 +69,7 @@ The following Widget classes are currently available: * **`Gpu`** Bars for GPU and VRAM usage - requires `nvidia-smi` * **`GpuTop`** Show processes currently using the CPU. * **`Network`** Graphs for up- and download speed - with space for conky.text in between. -* **`Drive`** Bar plus temperature indicator for a hard drive - requires hddtemp to be running and sudo access to nvme-cli for experimental NVME SSD support. +* **`Drive`** Bar plus temperature indicator for a HDD or SSD. ## Creating Widgets diff --git a/src/widget.lua b/src/widget.lua index 1ff15b4..d8d830f 100644 --- a/src/widget.lua +++ b/src/widget.lua @@ -473,8 +473,8 @@ local write_aligned = {left = ch.write_left, -- @tparam ?string args.align "left" (default), "center" or "right" -- @tparam[opt=w.default_font_family] ?string args.font_family -- @tparam[opt=w.default_font_size] ?number args.font_size --- @tparam[opt=CAIRO_FONT_WEIGHT_NORMAL] ?cairo_font_slant_t args.font_slant --- @tparam[opt=CAIRO_FONT_SLANT_NORMAL] ?cairo_font_weight_t args.font_weight +-- @tparam[opt=CAIRO_FONT_SLANT_NORMAL] ?cairo_font_slant_t args.font_slant +-- @tparam[opt=CAIRO_FONT_WEIGHT_NORMAL] ?cairo_font_weight_t args.font_weight -- @tparam ?{number,number,number,number} args.color (default: `default_text_color`) function Text:init(args) assert(getmetatable(self) ~= Text, "Cannot instanciate class Text directly.")