From 7b021d3eb20c9bf63ad8fa54ae253add47e551f6 Mon Sep 17 00:00:00 2001 From: Marco Hunsicker Date: Sat, 1 Mar 2014 09:55:29 +0100 Subject: i3status: Allow customization of module separator This patch adds the ability to customize the separator that is placed between modules. Specifically this patch: * adds the "separator" general directive * moves the definition of the default separator for the different output formats (excluding color formatting) to src/i3status.c * updates the SEC_CLOSE_MAP macro to disable the separator for the i3bar output format if the separator directive dictates so * changes print_seperator() in src/output.c to take a separator parameter in order to disable the output of the separator if the separator is empty and to use the provided separator otherwise * updates the manpage to explain the new directive --- man/i3status.man | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'man/i3status.man') diff --git a/man/i3status.man b/man/i3status.man index 614e22c..7ba4422 100644 --- a/man/i3status.man +++ b/man/i3status.man @@ -160,14 +160,41 @@ easier because the terminal-output of i3status becomes much more readable, but should only used for such quick glances, because it will only support very basic output-features (for example you only get 3 bits of color depth). none:: -Does not use any color codes. Separates values by the pipe symbol. This should -be used with i3bar and can be used for custom scripts. +Does not use any color codes. Separates values by the pipe symbol by default. +This should be used with i3bar and can be used for custom scripts. It's also possible to use the color_good, color_degraded, color_bad directives to define specific colors per module. If one of these directives is defined in a module section its value will override the value defined in the general section just for this module. +If you don't fancy the vertical separators between modules i3status/i3bar +uses by default, you can employ the +separator+ directive to configure how +modules are separated. You can either disable the default separator altogether +setting it to the empty string. You might then define separation as part of a +module's format string. This is your only option when using the i3bar output +format as the separator is drawn by i3bar directly otherwise. For the other +output formats, the provided non-empty string will be automatically enclosed +with the necessary coloring bits if color support is enabled. + +*Example configuration*: +------------------------------------------------------------- +general { + output_format = "xmobar" + separator = " " +} + +order += "load" +order += "disk /" + +load { + format = "[ load: %1min, %5min, %15min ]" +} +disk "/" { + format = "%avail" +} +------------------------------------------------------------- + === IPv6 This module gets the IPv6 address used for outgoing connections (that is, the -- cgit v1.2.3