URxvt uses dark colors for prompt instead of light (which xterm uses)

859 views Asked by At

I've just moved from xterm to URxvt and the shell prompt with URxvt uses the dark version of the colors instead of the light. Not sure if there's something obvious I've missed in the switch.

xterm prompt: enter image description here

URxvt prompt: enter image description here

.Xresources with xterm:

XTerm*font: xft:Source Code Pro for Powerline-10:pixelsize=17:hinting=True;antialias:True
! sync primary and main clipboards
XTerm*selectToClipboard: true
! double-click highlights words until blank text
XTerm*VT100.cutNewLine: false
XTerm*VT100.cutToBeginningOfLine: false
XTerm*VT100.charClass: 33:48,35:48,37:48,42:48,45-47:48,64:48,95:48,126:48

xterm*highlightSelection: true

! XTerm*font: 9x15
XTerm*faceName: Inconsolata
XTerm*faceSize: 13
XTerm*allowBoldFonts: false
XTerm*boldMode: false
XTerm*colorBDMode: true
XTerm*foreground: #c5c8c6
XTerm*background: #111111
*cursorColor:  #aeafad
*color0:       #000000
*color1:       #912226
*color2:       #727b33
*color3:       #ae7b00
*color4:       #1d2594
*color5:       #682a9b
*color6:       #2b6651
*color7:       #929593
*color8:       #666666
*color9:       #cc6666
*color10:      #b5bd68
*color11:      #f0c674
*color12:      #81a2be
*color13:      #b294bb
*color14:      #8abeb7
*color15:      #ecebec

.Xresources with URxvt:

URxvt.scrollBar: false
URxvt.font: xft:Source Code Pro for Powerline-10:pixelsize=17:hinting=True;antialias:True
URxvt.intensityStyles: false
URxvt.highlightSelection: true

! Fix ctrl moving through words
URxvt*altSendsEscape: true
URxvt.keysym.Control-Up: \033[1;5A
URxvt.keysym.Control-Down: \033[1;5B
URxvt.keysym.Control-Left: \033[1;5D
URxvt.keysym.Control-Right: \033[1;5C

! sync primary and main clipboards
URxvt.selectToClipboard: true

URxvt*background:  #111111
URxvt*foreground:  #c5c8c6
URxvt*cursorColor: #aeafad
URxvt*color0:      #000000
URxvt*color1:      #912226
URxvt*color2:      #727b33
URxvt*color3:      #ae7b00
URxvt*color4:      #1d2594
URxvt*color5:      #682a9b
URxvt*color6:      #2b6651
URxvt*color7:      #929593
URxvt*color8:      #666666
URxvt*color9:      #cc6666
URxvt*color10:     #b5bd68
URxvt*color11:     #f0c674
URxvt*color12:     #81a2be
URxvt*color13:     #b294bb
URxvt*color14:     #8abeb7
URxvt*color15:     #ecebec
2

There are 2 answers

0
unclemeat On

It was a combination of URxvt.intensityStyles being set to false, and the bold font.

I've removed URxvt.intensityStyles: false from the config and added URxvt.boldFont: Source Code Pro for Powerline-10:pixelsize=17:hinting=True;antialias:True.

0
Thomas Dickey On

The short answer is that xterm and urxvt do not combine bold attribute with color in the same way. In ncurses, that should be reflected in the ncv (no color video) mask (and tell ncurses to not bother trying to do that), but your shell-prompt isn't that sophisticated — and you'd probably not like it to stop doing bold, even though the result is not quite what you'd expect.

You can see the differences using tack, though Fedora seems not to have packaged that (it's been separate from ncurses for more than 10 years). Here's a screenshot comparing xterm and ncurses, using the terminal descriptions provided by Fedora (but see this page): comparing xterm and urxvt video-attributes combined with color