Subject: [sup-talk] colour customisation

From: [email-masked] (Jörg-Hendrik Bach)
Date: Fri, 3 Jul 2009 18:05:23 +0200

Hello list,

is there any documentation on which parts of the display can be changed via the
.sup/colors.yaml? From the wiki entry[1] it is possible to figure out some of
the variables, but I haven't got all.

cheers,
- J?rg-Hendrik

[1] http://sup.rubyforge.org/wiki/wiki.pl?CustomizingColors

---

From: [email-masked] (Andrei Thorp)
Date: Fri, 03 Jul 2009 13:13:29 -0400

> the variables, but I haven't got all.

I don't really know, but from browsing the source briefly, I've
found (formatted as quote):

>  DEFAULT_COLORS = {
>    :status => { :fg => "white", :bg => "blue", :attrs => ["bold"] },
>    :index_old => { :fg => "white", :bg => "default" },
>    :index_new => { :fg => "white", :bg => "default", :attrs => ["bold"] },
>    :index_starred => { :fg => "yellow", :bg => "default", :attrs => ["bold"] },
>    :index_draft => { :fg => "red", :bg => "default", :attrs => ["bold"] },
>    :labellist_old => { :fg => "white", :bg => "default" },
>    :labellist_new => { :fg => "white", :bg => "default", :attrs => ["bold"] },
>    :twiddle => { :fg => "blue", :bg => "default" },
>    :label => { :fg => "yellow", :bg => "default" },
>    :message_patina => { :fg => "black", :bg => "green" },
>    :alternate_patina => { :fg => "black", :bg => "blue" },
>    :missing_message => { :fg => "black", :bg => "red" },
>    :attachment => { :fg => "cyan", :bg => "default" },
>    :cryptosig_valid => { :fg => "yellow", :bg => "default", :attrs => ["bold"] },
>    :cryptosig_unknown => { :fg => "cyan", :bg => "default" },
>    :cryptosig_invalid => { :fg => "yellow", :bg => "red", :attrs => ["bold"] },
>    :generic_notice_patina => { :fg => "cyan", :bg => "default" },
>    :quote_patina => { :fg => "yellow", :bg => "default" },
>    :sig_patina => { :fg => "yellow", :bg => "default" },
>    :quote => { :fg => "yellow", :bg => "default" },
>    :sig => { :fg => "yellow", :bg => "default" },
>    :to_me => { :fg => "green", :bg => "default" },
>    :starred => { :fg => "yellow", :bg => "default", :attrs => ["bold"] },
>    :starred_patina => { :fg => "yellow", :bg => "green", :attrs => ["bold"] },
>    :alternate_starred_patina => { :fg => "yellow", :bg => "blue", :attrs => ["bold"] },
>    :snippet => { :fg => "cyan", :bg => "default" },
>    :option => { :fg => "white", :bg => "default" },
>    :tagged => { :fg => "yellow", :bg => "default", :attrs => ["bold"] },
>    :draft_notification => { :fg => "red", :bg => "default", :attrs => ["bold"] },
>    :completion_character => { :fg => "white", :bg => "default", :attrs => ["bold"] },
>    :horizontal_selector_selected => { :fg => "yellow", :bg => "default", :attrs => ["bold"] },
>    :horizontal_selector_unselected => { :fg => "cyan", :bg => "default" },
>    :search_highlight => { :fg => "black", :bg => "yellow", :attrs => ["bold"] },
>    :system_buf => { :fg => "blue", :bg => "default" },
>    :regular_buf => { :fg => "white", :bg => "default" },
>    :modified_buffer => { :fg => "yellow", :bg => "default", :attrs => ["bold"] },
>  }

You can probably extrapolate how to do colouring based on this? If you
have the energy, please update the wiki to maybe mention this list, etc.
Last I saw, the page was fairly out of date.

Hope this helps,
-- 
Andrei Thorp, Developer: Xandros Corp. (http://www.xandros.com)

---

From: [email-masked] (William Morgan)
Date: Fri, 03 Jul 2009 11:54:46 -0700

> found (formatted as quote):

This is correct. That is the list of parts of the display that can be
changed, and their default colors. The possible colors for both
foreground and background are the curses palette: black, red, green,
yellow, blue, magenta, cyan, white, and "default". The possible
attributes are the curses attributes: normal, standout, underline,
reverse, blink, dim, bold, protect, invis. (I have no idea what many
of those actually do.)

Any of those settings can be overwritten by making a ~/.sup/colors.yaml
file, which should be a YAML hash of the exact same format as
DEFAULT_COLORS.

A good way to get started it to do this:

  ruby -rubygems -rsup -e 'print Redwood::Colormap::DEFAULT_COLORS.to_yaml' > ~/.sup/colors.yaml

and then edit the result.

A gold star to whoever updates the wiki.
-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (Jörg-Hendrik Bach)
Date: Sat, 04 Jul 2009 14:01:25 +0200

I started updating the wiki page on customized colours,
http://sup.rubyforge.org/wiki/wiki.pl?CustomizingColors

I added explanations for the obvious entries, and a few that I found by
trial and error. However, a large part of the description is still
missing, I didn't have enough time to find all the colours; but at least
it's a start.

---

From: [email-masked] (Andrei Thorp)
Date: Mon, 06 Jul 2009 09:47:42 -0400

> missing, I didn't have enough time to find all the colours; but at least

Daaamn. Fine work you've done there. I'm really impressed with the
graphics :)

Just from reading over the names of the list and not consulting the
source:
 - index_draft is obviously what colour drafts in the inbox are
 - cryptosig variables probably have to do with what colours the stuff
   for signed messages are.
 - search_highlight is probably the colour for when you search in a
   buffer and some stuff is highlighted (yellow)

Anyway, thanks for all your work.
-- 
Andrei Thorp, Developer: Xandros Corp. (http://www.xandros.com)