public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Colours used in mintty
@ 2010-04-09  8:06 Fergus
  2010-04-09  8:42 ` Fergus
  0 siblings, 1 reply; 6+ messages in thread
From: Fergus @ 2010-04-09  8:06 UTC (permalink / raw)
  To: Cygwin ML; +Cc: Fergus

Just moved to mintty because I can't resolve problem of rxvt hanging 
around after <Ctrl-D> (and despite high hopes that cygwin-1.7.3-1 would 
address this, as in "Fix deadlock problem between atexit and dlclose 
processing which caused some programs to hang on exit" -- oh, well).

Is there a way of changing the default text colours used by mintty for 
directories, links, etc. E.g for rxvt and xterm in ~/.Xdefaults you can have

rxvt*background:    white
rxvt*foreground:    black
rxvt*color10:       green4
rxvt*color12:       blue
rxvt*color14:       brown

xterm*background:   white
xterm*foreground:   black
xterm*color10:      darkgreen
xterm*color12:      blue
xterm*color14:      brown

In .minttyrc I tried setting both of

Term=xterm and then Term=xterm-256color

but neither picked up the xterm settings in .Xdefaults.

Or rather, it picks up some: bg, fg, color12 (directories) and (I think) 
color10 (executables). But not color14 (links). (Incidentally, is it 
picking up the ones it does pick up correctly from rxvt*color?? or 
xterm*color?? or somewhere else entirely?)

Thank you.

Fergus


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Colours used in mintty
  2010-04-09  8:06 Colours used in mintty Fergus
@ 2010-04-09  8:42 ` Fergus
  0 siblings, 0 replies; 6+ messages in thread
From: Fergus @ 2010-04-09  8:42 UTC (permalink / raw)
  To: Cygwin ML; +Cc: Fergus

Sorry: just seen in the manual: write
echo $'\e]4;3;255,255,0\a'
and similarly, in a script.
Fergus


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Colours used in mintty
  2010-07-15 15:30 ` Jeremy Bopp
@ 2010-07-16  0:16   ` Eric Blake
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Blake @ 2010-07-16  0:16 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 636 bytes --]

>> I am using
>>
>> echo $'\e]4;3;255,  0,  0\a' # color3 for devices
> 
> Have you tried using "echo -n"?

Don't get in the habit.  Use printf(1) instead:

printf %s %'\e]4;3;255,  0,  0\a'

echo(1) is non-portable when it comes to options, and 'echo -n' will not
behave the same on all shells; you are better off learning the portable
alternative up front, in case you run into a situation where you aren't
using bash.

[I'll leave the fact that $'' is also a non-portable bash-ism for
another discussion]

-- 
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Colours used in mintty
  2010-07-15 15:21 Fergus
  2010-07-15 15:30 ` Jeremy Bopp
@ 2010-07-15 15:45 ` Fergus
  1 sibling, 0 replies; 6+ messages in thread
From: Fergus @ 2010-07-15 15:45 UTC (permalink / raw)
  To: Cygwin ML, Fergus

>>> Is there a way of changing the default text colours
>>> used by mintty for directories, links, executables, etc?

 >>  From man mintty: use
>>  echo $'\e]4;3;255,255,0\a'
>>  and similarly, in a script.

> I am using
>   echo $'\e]4;3;255,  0,  0\a' # color3 for devices
>   echo $'\e]4;6;139, 69, 19\a' # color6 for links
> in .bashrc with the consequence that each new mintty terminal starts 
> with 2 blank lines. Is there a way I can set the colors but suppress the 
> newlines?

Use echo -n.
(Sorry for public soliloquy.)

Fergus


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Colours used in mintty
  2010-07-15 15:21 Fergus
@ 2010-07-15 15:30 ` Jeremy Bopp
  2010-07-16  0:16   ` Eric Blake
  2010-07-15 15:45 ` Fergus
  1 sibling, 1 reply; 6+ messages in thread
From: Jeremy Bopp @ 2010-07-15 15:30 UTC (permalink / raw)
  To: cygwin

On 7/15/2010 10:18 AM, Fergus wrote:
>>> Is there a way of changing the default text colours
>>> used by mintty for directories, links, executables, etc?
> 
>>  From man mintty: use
>>  echo $'\e]4;3;255,255,0\a'
>>  and similarly, in a script.
> 
> I am using
> 
> echo $'\e]4;3;255,  0,  0\a' # color3 for devices
> echo $'\e]4;6;139, 69, 19\a' # color6 for links
> 
> in .bashrc with the consequence that each new mintty terminal starts
> with 2 blank lines. Is there a way I can set the colors but suppress the
> newlines?

Have you tried using "echo -n"?

-Jeremy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Colours used in mintty
@ 2010-07-15 15:21 Fergus
  2010-07-15 15:30 ` Jeremy Bopp
  2010-07-15 15:45 ` Fergus
  0 siblings, 2 replies; 6+ messages in thread
From: Fergus @ 2010-07-15 15:21 UTC (permalink / raw)
  To: Cygwin ML; +Cc: Fergus

 >> Is there a way of changing the default text colours
 >> used by mintty for directories, links, executables, etc?

 >  From man mintty: use
 >  echo $'\e]4;3;255,255,0\a'
 >  and similarly, in a script.

I am using

echo $'\e]4;3;255,  0,  0\a' # color3 for devices
echo $'\e]4;6;139, 69, 19\a' # color6 for links

in .bashrc with the consequence that each new mintty terminal starts 
with 2 blank lines. Is there a way I can set the colors but suppress the 
newlines?

Thank you.

Fergus


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-07-15 19:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-09  8:06 Colours used in mintty Fergus
2010-04-09  8:42 ` Fergus
2010-07-15 15:21 Fergus
2010-07-15 15:30 ` Jeremy Bopp
2010-07-16  0:16   ` Eric Blake
2010-07-15 15:45 ` Fergus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).