You are not logged in.

#1 2010-11-19 10:58:13

archiebrown
Member
Registered: 2010-11-19
Posts: 4

how to have urxvt look like bash (font, colors, manpages)

i'm new to archlinux, but have used GNU linux for some years

i'd like to run urxvt with exactly the same look bash has before i start X; namely:
same font, face, size, color; colors applied by `-color=auto'; colored manpages

so far, this is what i've come up with:

since in /etc/rc.conf i set CONSOLEFONT="Lat2-Terminus16" i installed
terminus-font 4.30-1 to have it available in X

for colors and to avoid bold typeface, this is a satisfactory command line:
urxvt -fn xft:Terminus -fb xft:Terminus -fg darkgray -bg black --color12 royalblue

even if i don't specify the font size, urxvt's and bash's match (i think it's 10);
colors are quite -- yet not exactly -- the same; where can i find human-readable
names for colors to use in urxvt?

manpages, however, don't get displayed in colors

my point is: isn't there a straightforward way to make urxvt use bash's settings?

thanks in advance for any suggestion

Offline

#2 2010-11-19 11:30:46

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: how to have urxvt look like bash (font, colors, manpages)

I assume you mean to make urxvt look like the Linux console as bash is a shell.

And if so, I have no idea. Sorry, good luck.

Last edited by fsckd (2010-11-19 11:47:25)


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#3 2010-11-19 12:28:29

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

Re: how to have urxvt look like bash (font, colors, manpages)

put this in .Xdefaults and use the colors part for a start..

URxvt*font:     -*-terminus-medium-*-*-*-12-*-*-*-*-*-iso8859-2
URxvt*boldFont: -*-terminus-bold-*-*-*-12-*-*-*-*-*-iso8859-2

URxvt.background:   #1A1A1A
URxvt.foreground:   #999999

! Black 
*color0:              #333333
*color8:              #3D3D3D
! Red 
*color1:              #f03669
*color9:              #c75b79
! Green 
*color2:              #b8e346
*color10:              #c8e37e
! Yellow 
*color3:              #ffa402
*color11:              #ffbe4a
! Blue 
*color4:              #02a2ff
*color12:              #71cbff
! Magenta 
*color5:              #875c8d
*color13:              #e41f66
! Cyan 
*color6:              #6fa9d3
*color14:              #0078CE
! White 
*color7:              #899CA1
*color15:              #C0C0C0

Last edited by JokerBoy (2010-11-19 13:01:01)

Offline

#4 2010-11-19 13:30:39

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: how to have urxvt look like bash (font, colors, manpages)

archiebrown wrote:

urxvt -fn xft:Terminus -fb xft:Terminus -fg darkgray -bg black --color12 royalblue

https://bbs.archlinux.org/viewtopic.php?id=107735


terminus is not a ttf font, so don't use xft, Read that thread and make a fontline instead, like the one in the post above.

Edit: for colours in man pages, change the MANPAGER. Less, out of the box, does not do syntax highlighting for anything.

Last edited by Mr.Elendig (2010-11-19 13:32:30)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#5 2010-11-19 14:50:22

archiebrown
Member
Registered: 2010-11-19
Posts: 4

Re: how to have urxvt look like bash (font, colors, manpages)

thank you all for replying; i appreciate your kindness

i'm still at a loss as for manpages:

why are they colored when accessed at the console
but not any longer when man is invoked from a
terminal emulator?

Offline

#6 2010-11-19 14:56:10

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

Re: how to have urxvt look like bash (font, colors, manpages)

are you having something like this in your .bashrc?

# for colored man pages
export LESS_TERMCAP_mb=$'\E[1;31m'
export LESS_TERMCAP_md=$'\E[1;31m'
export LESS_TERMCAP_me=$'\E[1;37m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[1;34m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[1;32m'

Offline

#7 2010-11-19 14:57:38

Anikom15
Banned
From: United States
Registered: 2009-04-30
Posts: 836
Website

Re: how to have urxvt look like bash (font, colors, manpages)

The Linux console uses CGA colors. There are 8 colors with 2 intensities. Here are their codes (I'm not sure what order they should go in):
#000000
#0000aa
#00aa00
#00aaaa
#aa0000
#aa00aa
#aa5500
#aaaaaa
#555555
#5555ff
#55ff55
#55ffff
#ff5555
#ff55ff
#ffff55
#ffffff

If you use vim, put this in your .vimrc:

set bg=dark

You should be good to go.


Personally, I'd rather be back in Hobbiton.

Offline

#8 2010-11-19 22:05:37

archiebrown
Member
Registered: 2010-11-19
Posts: 4

Re: how to have urxvt look like bash (font, colors, manpages)

again thank you all for your precious help

besides this, i've found something correlated here:
http://www.linuxquestions.org/questions … rk-825007/

and here:
http://nion.modprobe.de/blog/archives/5 … pages.html

so, by appending my ~.bashrc with the following

# Less Colors for Man Pages
export LESS_TERMCAP_mb=$'\E[01;31m'       # begin blinking
export LESS_TERMCAP_md=$'\E[01;38;5;74m'  # begin bold
export LESS_TERMCAP_me=$'\E[0m'           # end mode
export LESS_TERMCAP_se=$'\E[0m'           # end standout-mode
export LESS_TERMCAP_so=$'\E[38;5;246m'    # begin standout-mode - info box
export LESS_TERMCAP_ue=$'\E[0m'           # end underline
export LESS_TERMCAP_us=$'\E[04;38;5;146m' # begin underline

(and resourcing it) manpages are colored when viewed in
terminal emulator, but in console mode they get awfully
doubly colored ('cause they were already)

so what i take is that in terminal emulation ls output is colored thanks
to `ls' being aliased to `ls --color=auto' in ~.bashrc; colors are anyway
not exactly the same

the console seems to need nothing so as to color manpages, and adding
the TERMCAP lines in ~.bashrc spoils man's colored output

Offline

Board footer

Powered by FluxBB