新しくインストールした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に感謝します。