diff options
author | Marco Hunsicker <i3@hunsicker.de> | 2014-03-05 20:53:07 +0100 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2014-03-07 08:46:44 +0100 |
commit | 1de12e7b20e7ce38e2777218f1d922b3255599e1 (patch) | |
tree | 237106d7c44437c2e477a8fb842828f4ca7bbb87 /man/i3status.man | |
parent | 0c2b518b8a30c08a69c07ab6ffeea98eb2d58424 (diff) |
Support align and min_width module options
This patch enables users to define "align" and "min_width" options
right in the i3status module config sections.
Specifically this patch:
* Adds macros for the two new options that are used in the option
definitions. As the min_width option can take either a string or a
number, a custom type has been added along with a corresponding callback
function that parses the provided value (and provides input validation).
The align option also uses a callback for input validation
* Expands all module config option definitions to include the new
options
* Extends the SEC_CLOSE_MAP() macro to generate the JSON for the new
options as necessary
* Updates the manpage to explain the new options
Diffstat (limited to 'man/i3status.man')
-rw-r--r-- | man/i3status.man | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/man/i3status.man b/man/i3status.man index 7ba4422..656a8bf 100644 --- a/man/i3status.man +++ b/man/i3status.man @@ -404,6 +404,35 @@ volume master { } ------------------------------------------------------------- +== Universal module options + +When using the i3bar output format, there are a few additional options that +can be used with all modules to customize their appearance: + +align:: + The alignment policy to use when the minimum width (see below) is not + reached. Either +center+ (default), +right+ or +left+. +min_width:: + The minimum width (in pixels) the module should occupy. If the module takes + less space than the specified size, the block will be padded to the left + and/or the right side, according to the defined alignment policy. This is + useful when you want to prevent the whole status line from shifting when + values take more or less space between each iteration. + The option can also be a string. In this case, the width of the given text + determines the minimum width of the block. This is useful when you want to + set a sensible minimum width regardless of which font you are using, and at + what particular size. Please note that a number enclosed with quotes will + still be treated as a number. + +*Example configuration*: +------------------------------------------------------------- +disk "/" { + format = "%avail" + align = "left" + min_width = 100 +} +------------------------------------------------------------- + == Using i3status with dzen2 After installing dzen2, you can directly use it with i3status. Just ensure that |