새로 설치한 Arch에서는 urxvt에 그래픽/아이콘이 표시되지 않습니다.
! ******************
! urxvt config
! ******************
URxvt*imLocale: en_US.UTF-8
URxvt*termName: rxvt
URxvt*depth: 24
URxvt*geometry: 90x30
URxvt*transparent: false
URxvt*fading: 0
URxvt*loginShell: true
! scrollback buffer lines - 65535 is max on most machines (64 is default)
URxvt*saveLines: 65535
URxvt*internalBorder: 3
URxvt*lineSpace: 0
! Fonts
URxvt*font: xft:Source Code Pro for Powerline:size=12
URxvt.letterSpace: 0
Xft.antialias: true
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
! Scrollbar
URxvt*scrollBar: false
! Disable Perl extension
! If you do not use the Perl extension features, you can improve the security
! and speed by disabling Perl extensions completely.
!URxvt.perl-ext:
!URxvt.perl-ext-common:
! -- Fonts -- !
!URxvt.font: xft:DejaVu Sans Mono:autohint=true:size=12,xft:Inconsolata\ for\ Powerline:autohint=true:size=12
!URxvt*font: xft:SourceCodePro+Powerline+Awesome+Regular:autohint=true:size=10
!URxvt*font: xft:Source\ Code\ Pro\ Medium:pixelsize=13:antialias=true:hinting=true,xft:Source\ Code\ Pro\ Medium:pixelsize=13:antialias=true:hinting=true
!URxvt*font: xft:Inconsolata for Powerline:pixelsize=27:minspace=False, xft:DejaVu Sans:pixelsize=18
!URxvt*boldFont: xft:Inconsolata Bold for Powerline:pixelsize=27:minspace=False, xft:DejaVu Sans:pixelsize=18
!
! special
*.foreground: #d8dee9
*.background: #1d1f21
*.cursorColor: #d8dee9
! black
*.color0: #2d2d2d
*.color8: #444444
! red
*.color1: #ed0b0b
*.color9: #b55454
! green
*.color2: #40a62f
*.color10: #78a670
! yellow
*.color3: #f2e635
*.color11: #faf380
! blue
*.color4: #327bd1
*.color12: #68a7d4
! magenta
*.color5: #b30ad0
*.color13: #c583d0
! cyan
*.color6: #32d0fc
*.color14: #8adaf1
! white
*.color7: #555555
*.color15: #e0e3e7
! *****************
! Copy and Paste
! *****************
! URxvt.clipboard.autocopy: true
! URxvt.keysym.M-c: perl:clipboard:copy
! URxvt.keysym.M-v: perl:clipboard:paste
! Disable ISO 14755 unicode input so we can use Ctrl-Shift bindings
URxvt.iso14755: false
URxvt.iso14755_52: false
! Disable Ctrl-Alt-c & Ctrl-Alt-v bindings (optional)
URxvt.keysym.C-M-c: builtin-string:
URxvt.keysym.C-M-v: builtin-string:
! Bind Ctrl-Shift-c & Ctrl-Shift-v to copy and paste
! I dont know why, but I needed to use hex keysym values to get it to work
URxvt.keysym.C-S-0x43: eval:selection_to_clipboard
URxvt.keysym.C-S-0x56: eval:paste_clipboard
! ***********End Copy and paste*******
! ******************
! /urxvt config
! ******************
다른 터미널(Termite)에서는 문제 없이 아이콘이 표시됩니다.
저는 i3 창 관리자와 ZSH만 기본 셸로 사용합니다. 실행은
fc-list | grep "Source Code Pro for Powerline"
예상된 결과를 반환합니다.
/home/sammy/.local/share/fonts/Source Code Pro for Powerline.otf: Source Code Pro for Powerline:style=Regular
/home/sammy/.fonts/Source Code Pro Black for Powerline.otf: Source Code Pro for Powerline,Source Code Pro Black:style=Black,Regular
/home/sammy/.fonts/Source Code Pro Powerline SemiboldItalic.otf: Source Code Pro for Powerline,Source Code Pro Semibold:style=Semibold Italic,Italic
/home/sammy/.local/share/fonts/Source Code Pro Medium for Powerline.otf: Source Code Pro for Powerline,Source Code Pro Medium:style=Medium,Regular
/home/sammy/.local/share/fonts/Source Code Pro Powerline BoldItalic.otf: Source Code Pro for Powerline:style=Bold Italic
/home/sammy/.fonts/Source Code Pro ExtraLight for Powerline.otf: Source Code Pro for Powerline,Source Code Pro ExtraLight:style=ExtraLight,Regular
/usr/share/fonts/OTF/Source Code Pro ExtraLight for Powerline.otf: Source Code Pro for Powerline,Source Code Pro ExtraLight:style=ExtraLight,Regular
/usr/share/fonts/OTF/Source Code Pro Powerline Italic.otf: Source Code Pro for Powerline:style=Italic
/home/sammy/.local/share/fonts/Source Code Pro Powerline SemiboldItalic.otf: Source Code Pro for Powerline,Source Code Pro Semibold:style=Semibold Italic,Italic
/home/sammy/.fonts/Source Code Pro Medium for Powerline.otf: Source Code Pro for Powerline,Source Code Pro Medium:style=Medium,Regular
/usr/share/fonts/OTF/Source Code Pro Medium for Powerline.otf: Source Code Pro for Powerline,Source Code Pro Medium:style=Medium,Regular
/home/sammy/.fonts/Source Code Pro Powerline MediumItalic.otf: Source Code Pro for Powerline,Source Code Pro Medium:style=Medium Italic,Italic
/usr/share/fonts/OTF/Source Code Pro Powerline BoldItalic.otf: Source Code Pro for Powerline:style=Bold Italic
/home/sammy/.local/share/fonts/Source Code Pro Powerline LightItalic.otf: Source Code Pro for Powerline,Source Code Pro Light:style=Light Italic,Italic
/usr/share/fonts/OTF/Source Code Pro Powerline MediumItalic.otf: Source Code Pro for Powerline,Source Code Pro Medium:style=Medium Italic,Italic
/home/sammy/.fonts/Source Code Pro Bold for Powerline.otf: Source Code Pro for Powerline:style=Bold
/usr/share/fonts/OTF/Source Code Pro Bold for Powerline.otf: Source Code Pro for Powerline:style=Bold
/home/sammy/.fonts/Source Code Pro Powerline Italic.otf: Source Code Pro for Powerline:style=Italic
/home/sammy/.fonts/Source Code Pro Light for Powerline.otf: Source Code Pro for Powerline,Source Code Pro Light:style=Light,Regular
/usr/share/fonts/OTF/Source Code Pro for Powerline.otf: Source Code Pro for Powerline:style=Regular
/home/sammy/.local/share/fonts/Source Code Pro Black for Powerline.otf: Source Code Pro for Powerline,Source Code Pro Black:style=Black,Regular
/home/sammy/.local/share/fonts/Source Code Pro Light for Powerline.otf: Source Code Pro for Powerline,Source Code Pro Light:style=Light,Regular
/usr/share/fonts/OTF/Source Code Pro Semibold for Powerline.otf: Source Code Pro for Powerline,Source Code Pro Semibold:style=Semibold,Regular
/usr/share/fonts/OTF/Source Code Pro Black for Powerline.otf: Source Code Pro for Powerline,Source Code Pro Black:style=Black,Regular
/home/sammy/.fonts/Source Code Pro for Powerline.otf: Source Code Pro for Powerline:style=Regular
/usr/share/fonts/OTF/Source Code Pro Powerline BlackItalic.otf: Source Code Pro for Powerline,Source Code Pro Black:style=Black Italic,Italic
/usr/share/fonts/OTF/Source Code Pro Powerline SemiboldItalic.otf: Source Code Pro for Powerline,Source Code Pro Semibold:style=Semibold Italic,Italic
/home/sammy/.local/share/fonts/Source Code Pro Powerline BlackItalic.otf: Source Code Pro for Powerline,Source Code Pro Black:style=Black Italic,Italic
/usr/share/fonts/OTF/Source Code Pro Powerline LightItalic.otf: Source Code Pro for Powerline,Source Code Pro Light:style=Light Italic,Italic
/home/sammy/.fonts/Source Code Pro Powerline BlackItalic.otf: Source Code Pro for Powerline,Source Code Pro Black:style=Black Italic,Italic
/home/sammy/.local/share/fonts/Source Code Pro Powerline MediumItalic.otf: Source Code Pro for Powerline,Source Code Pro Medium:style=Medium Italic,Italic
/usr/share/fonts/OTF/Source Code Pro Light for Powerline.otf: Source Code Pro for Powerline,Source Code Pro Light:style=Light,Regular
/home/sammy/.fonts/Source Code Pro Powerline ExtraLightItalic.otf: Source Code Pro for Powerline,Source Code Pro ExtraLight:style=ExtraLight Italic,Italic
/home/sammy/.local/share/fonts/Source Code Pro Semibold for Powerline.otf: Source Code Pro for Powerline,Source Code Pro Semibold:style=Semibold,Regular
/home/sammy/.local/share/fonts/Source Code Pro Powerline ExtraLightItalic.otf: Source Code Pro for Powerline,Source Code Pro ExtraLight:style=ExtraLight Italic,Italic
/home/sammy/.local/share/fonts/Source Code Pro ExtraLight for Powerline.otf: Source Code Pro for Powerline,Source Code Pro ExtraLight:style=ExtraLight,Regular
/usr/share/fonts/OTF/Source Code Pro Powerline ExtraLightItalic.otf: Source Code Pro for Powerline,Source Code Pro ExtraLight:style=ExtraLight Italic,Italic
/home/sammy/.local/share/fonts/Source Code Pro Bold for Powerline.otf: Source Code Pro for Powerline:style=Bold
/home/sammy/.fonts/Source Code Pro Semibold for Powerline.otf: Source Code Pro for Powerline,Source Code Pro Semibold:style=Semibold,Regular
/home/sammy/.local/share/fonts/Source Code Pro Powerline Italic.otf: Source Code Pro for Powerline:style=Italic
/home/sammy/.fonts/Source Code Pro Powerline LightItalic.otf: Source Code Pro for Powerline,Source Code Pro Light:style=Light Italic,Italic
/home/sammy/.fonts/Source Code Pro Powerline BoldItalic.otf: Source Code Pro for Powerline:style=Bold Italic
xrdb -m ~/.Xresources
.Xresources를 변경할 때마다 이 작업을 수행합니다.
편집: 스크린샷의 출력은 ls를 exa 별칭으로 사용하여 생성되었으며, 이는 Nerd 글꼴을 설치했기 때문에 이에 따라 달라집니다.
fc-list | grep "Nerd"
/usr/share/fonts/TTF/Sauce Code Pro Light Italic Nerd Font Complete Mono.ttf: SauceCodePro Nerd Font Mono:style=Light Italic,Italic
/usr/share/fonts/TTF/Sauce Code Pro Black Italic Nerd Font Complete.ttf: SauceCodePro Nerd Font:style=Black Italic,Italic
/usr/share/fonts/TTF/Sauce Code Pro Semibold Nerd Font Complete Mono.ttf: SauceCodePro Nerd Font Mono:style=Semibold,Regular
/usr/share/fonts/TTF/Sauce Code Pro Bold Nerd Font Complete.ttf: SauceCodePro Nerd Font:style=Bold
/usr/share/fonts/TTF/Sauce Code Pro Semibold Italic Nerd Font Complete.ttf: SauceCodePro Nerd Font:style=Semibold Italic,Italic
/usr/share/fonts/TTF/Sauce Code Pro Italic Nerd Font Complete.ttf: SauceCodePro Nerd Font:style=Italic
/usr/share/fonts/TTF/Sauce Code Pro Light Nerd Font Complete.ttf: SauceCodePro Nerd Font:style=Light,Regular
/usr/share/fonts/TTF/Sauce Code Pro Nerd Font Complete.ttf: SauceCodePro Nerd Font:style=Regular
/usr/share/fonts/TTF/Sauce Code Pro Italic Nerd Font Complete Mono.ttf: SauceCodePro Nerd Font Mono:style=Italic
/usr/share/fonts/TTF/Sauce Code Pro Bold Nerd Font Complete Mono.ttf: SauceCodePro Nerd Font Mono:style=Bold
/usr/share/fonts/TTF/Sauce Code Pro Medium Italic Nerd Font Complete.ttf: SauceCodePro Nerd Font:style=Medium Italic,Italic
/usr/share/fonts/TTF/Sauce Code Pro Medium Nerd Font Complete.ttf: SauceCodePro Nerd Font:style=Medium,Regular
/usr/share/fonts/TTF/Sauce Code Pro ExtraLight Italic Nerd Font Complete.ttf: SauceCodePro Nerd Font:style=ExtraLight Italic,Italic
/usr/share/fonts/TTF/Sauce Code Pro Bold Italic Nerd Font Complete Mono.ttf: SauceCodePro Nerd Font Mono:style=Bold Italic
/usr/share/fonts/TTF/Sauce Code Pro Medium Italic Nerd Font Complete Mono.ttf: SauceCodePro Nerd Font Mono:style=Medium Italic,Italic
/usr/share/fonts/TTF/Sauce Code Pro Light Nerd Font Complete Mono.ttf: SauceCodePro Nerd Font Mono:style=Light,Regular
/usr/share/fonts/TTF/Sauce Code Pro Bold Italic Nerd Font Complete.ttf: SauceCodePro Nerd Font:style=Bold Italic
/usr/share/fonts/TTF/Sauce Code Pro ExtraLight Nerd Font Complete Mono.ttf: SauceCodePro Nerd Font Mono:style=ExtraLight,Regular
/usr/share/fonts/TTF/Sauce Code Pro Black Nerd Font Complete.ttf: SauceCodePro Nerd Font:style=Black,Regular
/usr/share/fonts/TTF/Sauce Code Pro Black Italic Nerd Font Complete Mono.ttf: SauceCodePro Nerd Font Mono:style=Black Italic,Italic
/usr/share/fonts/TTF/Sauce Code Pro ExtraLight Nerd Font Complete.ttf: SauceCodePro Nerd Font:style=ExtraLight,Regular
/usr/share/fonts/TTF/Sauce Code Pro Medium Nerd Font Complete Mono.ttf: SauceCodePro Nerd Font Mono:style=Medium,Regular
/usr/share/fonts/TTF/Sauce Code Pro Black Nerd Font Complete Mono.ttf: SauceCodePro Nerd Font Mono:style=Black,Regular
/usr/share/fonts/TTF/Sauce Code Pro Semibold Italic Nerd Font Complete Mono.ttf: SauceCodePro Nerd Font Mono:style=Semibold Italic,Italic
/usr/share/fonts/TTF/Sauce Code Pro ExtraLight Italic Nerd Font Complete Mono.ttf: SauceCodePro Nerd Font Mono:style=ExtraLight Italic,Italic
/usr/share/fonts/TTF/Sauce Code Pro Nerd Font Complete Mono.ttf: SauceCodePro Nerd Font Mono:style=Regular
/usr/share/fonts/TTF/Sauce Code Pro Semibold Nerd Font Complete.ttf: SauceCodePro Nerd Font:style=Semibold,Regular
/usr/share/fonts/TTF/Sauce Code Pro Light Italic Nerd Font Complete.ttf: SauceCodePro Nerd Font:style=Light Italic,Italic
답변1
마침내 URxvt에서 문자/아이콘을 표시할 수 없는 이유를 찾았습니다. 이미 로 시스템을 설정했지만 en_CA.utf8
URxvt에서 UTF-8을 활성화하려면 en_US.utf8을 추가해야 했습니다. URxvt의 모든 UTF-8 관련 문제를 해결하려면 다음 명령을 실행하십시오.
localectl set-locale LANG=en_US.UTF-8
문제를 해결하려면 아래 .Xresources 파일을 사용하세요.
! special colors
*.foreground: #a39e9b
*.background: #2f1e2e
*.cursorColor: #a39e9b
! black
*.color0: #2f1e2e
*.color8: #776e71
! red
*.color1: #ef6155
*.color9: #ef6155
! green
*.color2: #48b685
*.color10: #48b685
! yellow
*.color3: #fec418
*.color11: #fec418
! blue
*.color4: #06b6ef
*.color12: #06b6ef
! magenta
*.color5: #815ba4
*.color13: #815ba4
! cyan
*.color6: #5bc4bf
*.color14: #5bc4bf
! white
*.color7: #a39e9b
*.color15: #e7e9db
! Urxvt Specific Settings
URxvt*scrollBar: false
URxvt*scrollBar_right: false
URxvt.iso14755: false
URxvt.font: xft:MesloLGS Nerd Font:autohint=true:size=12,xft:TerminessTTFNerdFontMono:size=12
*antialias: true
*autohint: true
! Restore Ctrl+Shift+(c|v)
URxvt.keysym.Shift-Control-V: eval:paste_clipboard
URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
!URxvt.iso14755: false
URxvt.iso14755_52: false
! Common navigation Keybinds
URxvt.keysym.Shift-Up: command:\033]720;1\007
URxvt.keysym.Shift-Down: command:\033]721;1\007
URxvt.keysym.Control-Up: \033[1;5A
URxvt.keysym.Control-Down: \033[1;5B
URxvt.keysym.Control-Right: \033[1;5C
URxvt.keysym.Control-Left: \033[1;5D
!! Copy, Paste + More
URxvt.perl-ext-common: default,clipboard,url-select,keyboard-select
URxvt.keysym.M-Escape: perl:keyboard-select:activate
URxvt.keysym.M-s: perl:keyboard-select:search
URxvt.keysym.M-u: perl:url-select:select_next
URxvt.urlLauncher: firefox
URxvt.underlineURLs: true
URxvt.urlButton: 2
URxvt.url-select.autocopy:true
도움을 주신 @terdon과 @Marc Wilson에게 감사드립니다.