help with changing colors!

Hi everyone! I just started using FreeBSD, but I'm wondering how can I get it like that (in the picture)? Which commands do I have to use?

3a7fc583ba538d21091fa9407adc12fc.jpg
 
You can alter your color settings in ~/.Xresources.

Example:
Code:
! tangoesque scheme
*background: #111111
*foreground: #babdb6
! Black (not tango) + DarkGrey
*color0:  #000000
*color8:  #555753
! DarkRed + Red
*color1:  #ff6565
*color9:  #ff8d8d
! DarkGreen + Green
*color2:  #93d44f
*color10: #c8e7a8
! DarkYellow + Yellow
*color3:  #eab93d
*color11: #ffc123
! DarkBlue + Blue
*color4:  #204a87
*color12: #3465a4
! DarkMangenta + Mangenta
*color5:  #ce5c00
*color13: #f57900
!DarkCyan + Cyan (both not tango)
*color6:  #89b6e2
*color14: #46a4ff
! LightGrey + White
*color7:  #cccccc
*color15: #ffffff

I also think you need to merge it with the X server resource db.
Code:
xrdb -merge ~/.Xresources
 
In the picture you've submitted I see few different apps. The colours of editors/vim you have to use /usr/local/share/vim/vimrc or ~/.vimrc; example files are located in /usr/local/share/vim/vim7x/vimrc_example.vim (where vim7x is obviously your vim version). For your terminal you can play with:

Code:
export PS1="[\u@\[\033[92m\]\h\[\033[0m\] \W]\$ "

by changing 92m to different values that'll give you different colours (on the picture you've posted, you can see the option this guy chooses for his terminal :)). For grep you can use the extension --color, and more or less each application you're using may have some colour extension that your terminal will translate to some colour.
 
Adjusting your prompt differs between shells. In a c-shell you would use set prompt.
The weirdo characters are called ANSI color sequences. Look it up!

A tcsh example
Code:
# colored prompt
set prompt = "%{\033[32m%}%m:%{\033[1;33m%}%B%~%b%#%{\033[0m%} "

# Enables colorized output for ls(1)
alias ls ls -G

You may also want to read up on CLICOLOR and LSCOLORS in the ls(1) man page.

edited:
Oh, thanks Beastie for noticing! :)
 
Also, you can use a color wrapper, which is located in /usr/ports/sysutils/cw

However, to make use of cw you'll have to add the following to your shell configs:

sh: place

Code:
export PATH="/usr/local/lib/cw:$PATH"

at the end of /etc/profile

tcsh: place

Code:
setenv PATH "/usr/local/lib/cw:$PATH"

at the end of ~/.login or /etc/csh.login
 
Anyone know how to set that (and where) in zsh (.zshrc)? Anything I try (the manpage is too huge) either does nothing or destroys the existing paths...
 
jb_fvwm2 said:
Anyone know how to set that (and where) in zsh (.zshrc)? Anything I try (the manpage is too huge) either does nothing or destroys the existing paths...

If you're on about colorwrapper, you can set the path variable in:

~/.zshenv

The following should work, tho I haven't used zsh before and could be wrong.

Code:
PATH=/usr/local/bin/cw;$PATH
 
jb_fvwm2 said:
Anyone know how to set that (and where) in zsh (.zshrc)? Anything I try (the manpage is too huge) either does nothing or destroys the existing paths...

zsh is compatable with both bourne and c syntax. You may need to turn something on for c. I put mine in .zshrc. If you want to use custom functions they have their own syntax fpath.

I agree zsh man pages kinda suck. The zshall has everything in it if you don't want to monkey around looking at the main zsh man page to locate the man page to be looking at.
 
Back
Top