[PATCH] xprop: Add colored icon support

Thomas Dickey dickey at his.com
Thu Nov 12 01:11:04 PST 2009


On Thu, 12 Nov 2009, Andy Spencer wrote:

> * Supports both 16 and 265 color terminals
> * 8 color output supports ascii and utf8 brightness
>
> Signed-off-by: Andy Spencer <andy753421 at gmail.com>
> ---
>
> I'm not sure how to test for 16 and 256 color so I left them set to 0.

The proper way is to check the terminal database (using newterm to open 
it, for instance, and tigetnum("colors") to get the value).

> +	/* TODO: test for color */
> +	if (0 || 0)
> +	    tail += sprintf (tail, "\33[0m");
>     }
>

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net



More information about the xorg mailing list