After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 104968 - color underline mode
color underline mode
Status: RESOLVED OBSOLETE
Product: vte
Classification: Core
Component: general
0.10.x
Other Linux
: Normal enhancement
: ---
Assigned To: VTE Maintainers
Nalin Dahyabhai
: 53436 353444 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-02-01 07:26 UTC by Ryan Lovett
Modified: 2021-06-10 12:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A comparison of xterm and gnome-terminal (50.98 KB, image/png)
2003-02-01 07:26 UTC, Ryan Lovett
Details

Description Ryan Lovett 2003-02-01 07:26:11 UTC
Xterm can make use of the X resources: colorBDMode and colorBD, and colorUL
mode and colorUL. One can use these to assign colors to bold or underline
text. This is very handy for reading man pages, viewing top, or other
terminal content with bold and/or underline text.
Comment 1 Ryan Lovett 2003-02-01 07:26:47 UTC
Created attachment 14014 [details]
A comparison of xterm and gnome-terminal
Comment 2 Nalin Dahyabhai 2003-02-21 03:18:49 UTC
Bold text already has a different color (the default color location,
but chosen from the second row of colors in gnome-terminal's palette
rather than the first).

Underlining, however, is a different matter.  I haven't managed to get
my local copy of Xterm to actually underline text, so once vte
implemented underlining I didn't think it made sense to do both at the
same time.

Making this work requires adding a function to designate the underline
color to the libvte interface, and whatever UI changes are necessary
in gnome-terminal to make it customizable.
Comment 3 Ryan Lovett 2003-02-21 03:33:28 UTC
Thanks for looking into this.

Setting gnome-terminal's second-row bold color works when I set my
prompt to use bold, e.g. in tcsh:

set prompt='%{^[[1;30m%}%m%{^[[0m%}> '

I think its the 1;30 that does it. But the bold text as displayed by
top, nroff, etc. is still white. My palette scheme is based on Rxvt
with the only change being color 9 is '#55aaff'.
Comment 4 Nalin Dahyabhai 2003-02-21 03:41:20 UTC
This bears a bit of explanation.  Traditionally you had an 8-color
model.  The default foreground color was 7 (gray), and the background
was 0 (black).  Bold colors were simply a "brighter" version of the
existing colors, so the default bold color was bright gray = white. 
I'll call this a 16-color model.

Along come terminal emulators, and you can suddenly choose a default
foreground and background color pair that are different from the
8-color palette, and you can modify the contents of the bold palette.
  I call this an 18-color model. 

Applications don't know this, so to get a bright "1" (blue), they
request color "1" and "bright", which is mapped to color "9" (brighter
blue).  The default colors are just a special case.

For gray-on-black, having the default "bold" color be white makes
sense, but if you switch to black-on-white, bold text being white is
just stupid, so you add a "bold foreground" color, giving you a
19-color model.  This is the model the VteTerminal widget currently
uses (actually, that's not true, there are another 8 for "dim"
colors), but that's why changing the 9th color gave you the expected
results.

I think we seriously need to overhaul gnome-terminal's color palette
editor, in addition to adding the ability to set a custom color for
underlined text (but then, you can set underlining on in combination
with any foreground color, and now my head hurts).
Comment 5 Nalin Dahyabhai 2003-02-21 03:42:43 UTC
... and of course, I forgot to make my point:  gnome-terminal is using
a color value for bold text in the foreground color which it currently
doesn't let you edit.
Comment 6 Ryan Lovett 2003-02-21 05:55:55 UTC
Alright, many thanks for the explanation. I /think/ I understand.

Here's a vote then for having the above features in gnome-terminal.
Comment 7 Behdad Esfahbod 2006-04-22 19:32:46 UTC
*** Bug 53436 has been marked as a duplicate of this bug. ***
Comment 8 Behdad Esfahbod 2006-08-29 22:44:44 UTC
*** Bug 353444 has been marked as a duplicate of this bug. ***
Comment 9 Behdad Esfahbod 2010-01-07 21:10:25 UTC
I'm now pushed the UI for selecting a separate bold color to g-t.  Not for underline though.  Can we close this now?
Comment 10 Ryan Lovett 2010-01-07 22:51:42 UTC
Thanks very much for working on this nearly 7 year old bug. (actually, https://bugzilla.gnome.org/show_bug.cgi?id=53436 is almost 9!) I'd love to have the bug remain open for the underline color too, but beggars can't be choosers. :)
Comment 11 Behdad Esfahbod 2010-01-08 19:42:50 UTC
That would need vte API first.
Comment 12 murray.barton 2010-01-08 21:52:54 UTC
Thanks for making bold mode work.

Is a vte API in the pipeline?  How far away?
Comment 13 Behdad Esfahbod 2010-01-11 22:39:39 UTC
Nothing planned.  But should be pretty easy.  I'll add it next time I get to hacking vte.
Comment 14 Behdad Esfahbod 2010-04-08 15:06:59 UTC
ChPe, can you give me UI changes for separate underline color please?
We may want to move the "Background color" widgets to be in the same row as "Text color" to make more room...
Comment 15 Egmont Koblinger 2014-01-12 11:13:36 UTC
See bug 686043 too (the same issue for italic).
Comment 16 Egmont Koblinger 2014-01-22 01:41:44 UTC
If implemented, the OSC 5;1 (or OSC 4;257) counterpart (and their resetting versions) should be added in addition to the API. See bug 722751.
Comment 17 GNOME Infrastructure Team 2021-06-10 12:46:29 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vte/-/issues/741.