SGR in status text

Description

Allows the use of CSI SGR escape sequences in the status bar text to change text rendition. Currently supported are:

Configuration

Download the patch and apply it according to the general instructions.

Modify the barcolors definition in 'config.h' to suit your needs. For the 16 color version, you should have at least 16 colors defined.

Usage

Add code to your status script to output CSI SGR codes. They take the form ESC[1;2;3;4m.

In addition the 256 color version allows the use of: ESC[38;5;123m to set foreground to color 123 (48 changes background).

Example

With slstatus, you can have your date in bright red using:

{ datetime, "\033[1;31m%s\e[0m",           "%F %T" },

For a more pointless example, you could combine slstatus -s with nyancat:

slstatus -s | nyancat -2 | while read l; do xsetroot -name "$l"; done

And you'll get something like rainbow status.

Download

For 256 color support, apply the following on top:

Authors