You are not logged in.

#1 2010-06-15 07:01:32

magneticnorth
Member
Registered: 2010-06-14
Posts: 6

Bash Color Faded

I was messing around with my ~/.bashrc to add some colors to it. For some reason, all the colors are faded. When I use white, it is grey. When I use green, its more of a grey cyan. Also, the second line of my first bash prompt never gets the specified colors. Forgive me as I just started using Linux recently. Any suggestions?

My ~/.bashrc:

FONT_COLOR_GREEN="\[\e[0;32m\]"
FONT_COLOR_WHITE="\[\e[0;37m\]"

alias ls="ls --color=auto"

PS1="$FONT_COLOR_GREEN┌─[\w]\n└─[\u@\H]>$FONT_COLOR_WHITE "

Last edited by magneticnorth (2010-06-15 07:02:37)

Offline

#2 2010-06-15 07:29:28

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: Bash Color Faded

Try to remove the surrounding brackets in your font definitions, i.e.

FONT_COLOR_GREEN="\e[0;32m"
FONT_COLOR_WHITE="\e[0;37m"

This appears to work here (but I don't exactly know why sad ).

Last edited by bernarcher (2010-06-15 07:31:45)


To know or not to know ...
... the questions remain forever.

Offline

#3 2010-06-15 07:45:38

magneticnorth
Member
Registered: 2010-06-14
Posts: 6

Re: Bash Color Faded

I've tried that before, and tried it again just now. No luck here. sad My greens and whites look like a really dulled down / grayed out version of what is here: http://wiki.archlinux.org/index.php/Color_Bash_Prompt

Offline

#4 2010-06-15 07:58:28

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Bash Color Faded

Are you using an .Xdefaults file?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2010-06-15 08:01:53

magneticnorth
Member
Registered: 2010-06-14
Posts: 6

Re: Bash Color Faded

Yes I am. *colorN settings and URxvt settings. Nothing that really stands out though.

Offline

#6 2010-06-15 08:09:53

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Bash Color Faded

Could the color settings be the issue? If you post the file, it might help...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2010-06-15 08:16:01

hbekel
Member
Registered: 2008-10-04
Posts: 311

Re: Bash Color Faded

@benarcher: The surrounding brackets are necessary to denote a non printable character to bash, otherwise it won't be able to correctly calculate the length of the prompt string.

Some terminals use the same font with different colors to for "normal" and "bold" modes. Try these bold variants:

FONT_COLOR_GREEN="\[\e[1;32m\]"
FONT_COLOR_WHITE="\[\e[1;37m\]"

Offline

#8 2010-06-15 08:27:25

magneticnorth
Member
Registered: 2010-06-14
Posts: 6

Re: Bash Color Faded

Sorry, I can't wgetpaste my Xdefaults because my laptop isn't connected to the internet. I am posting this from my work PC, but unable to connect my laptop to the internet here.

My *colorN's are that Jason Ryan guy's (if I remembered his name correctly) that seem to be pretty popular. My URxvt changes are title, borderLess, buffered, cursorBlink, saveLines, background (black), foreground (white), transparent (true), tintColor (#0A0A0A), scrollstyle, and scrollBar.

If anything, I thought the tint may have affected the text colors, but that only affects the background.

@hbekel: I tried bold as suggested. Now it is a bold dull green and gray. Haha.

Edit: By the way, I think I am using that rxvt-unicode-256color package. Well, that is what I installed. I run the daemon in my xinitrc, then I just start urxvtc. I don't really see any indication that it is the 256color one instead of the normal one though.

Last edited by magneticnorth (2010-06-15 08:31:10)

Offline

#9 2010-06-15 09:08:13

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Bash Color Faded

magneticnorth wrote:

My *colorN's are that Jason Ryan guy's (if I remembered his name correctly) that seem to be pretty popular.

Lol.

I think you have found your problem...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#10 2010-06-15 09:30:51

magneticnorth
Member
Registered: 2010-06-14
Posts: 6

Re: Bash Color Faded

Haha. Woops! I didn't even look at who I was responding to when I said that.

I did not realize that *colorN's even affect the bash color codes. sad

Thanks for the help. Although, I still do have that issue where my second line of my first bash prompt isn't colored properly. Subsequent prompts are fine though.

Offline

Board footer

Powered by FluxBB