URxvt使用深色代替提示(xterm使用)

时间:2018-08-04 02:50:28

标签: xterm urxvt

我刚刚从xterm移到URxvt,并且带有URxvt的shell提示使用深色版本而不是浅色版本。不知道我是否在开关中错过了一些明显的东西。

xterm提示:enter image description here

URxvt提示:enter image description here

。带有xterm的Xresources:

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

。带有URxvt的Xresources:

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 个答案:

答案 0 :(得分:1)

简短的答案是xterm和urxvt不会以相同的方式将粗体属性与颜色结合在一起。在ncurses中,这应该反映在 ncv (无彩色视频)遮罩中(并告诉ncurses不要去尝试这样做),但是shell提示并不那么复杂—即使结果不完全符合您的期望,您也可能不希望它停止粗体显示。

您可以使用tack看到差异,尽管Fedora似乎没有打包(它与more than 10 years的ncurses分开了)。这是使用Fedora提供的终端描述来比较xterm和ncurses的屏幕截图(但请参见this page): comparing xterm and urxvt video-attributes combined with color

答案 1 :(得分:0)

这是URxvt.intensityStyles设置为false和粗体字体的组合。

我已从配置中删除URxvt.intensityStyles: false,并添加了URxvt.boldFont: Source Code Pro for Powerline-10:pixelsize=17:hinting=True;antialias:True