diff --git a/docs/docs.md b/docs/docs.md index c2ed2be..c612e86 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -682,7 +682,9 @@ for more information. A basic supported SGR sequence looks like this: `\033[X;YZm` Here, X specifies if you want normal or bright colors. Y specifies if you -want background or foreground. Z specifies the color number. +want background or foreground. Z specifies the color number. You can add +another separator and background color before Z to also specify a background +color. Foreground colors: `30` through `37` Background colors: `40` through `47` @@ -745,6 +747,11 @@ avoid using a `` tag, such as: `` : Big text (`text is so big here`) +You can also color foreground or background text using the `` tag. +For example `text` +will color the foreground and background. Of course, this is a bad way +to color text in spmenu because SGR sequences can be used instead. + Note that Pango markup is NOT escaped, and is piped to stdout. Therefore you need to parse it manually. Doing so with `sed` is very easy. For example: `... | spmenu ... | sed 's///g; s///g'` diff --git a/spmenu.1 b/spmenu.1 index bc3349b..e47b3dd 100644 --- a/spmenu.1 +++ b/spmenu.1 @@ -731,6 +731,8 @@ A basic supported SGR sequence looks like this: \f[V]\[rs]033[X;YZm\f[R] Here, X specifies if you want normal or bright colors. Y specifies if you want background or foreground. Z specifies the color number. +You can add another separator and background color before Z to also +specify a background color. .PP Foreground colors: \f[V]30\f[R] through \f[V]37\f[R] Background colors: \f[V]40\f[R] through \f[V]47\f[R] Reset: \f[V]0\f[R] @@ -796,6 +798,14 @@ Small text (\f[V]text is so small here\f[R]) \f[V]\f[R] Big text (\f[V]text is so big here\f[R]) .PP +You can also color foreground or background text using the +\f[V]\f[R] tag. +For example +\f[V]text\f[R] +will color the foreground and background. +Of course, this is a bad way to color text in spmenu because SGR +sequences can be used instead. +.PP Note that Pango markup is NOT escaped, and is piped to stdout. Therefore you need to parse it manually. Doing so with \f[V]sed\f[R] is very easy.