Installing powerline fonts for zsh + Prezto theme

前端 未结 5 1723
感动是毒
感动是毒 2021-01-31 23:13

I am currently using Zsh + Prezto for my scripting shell configuration. I have been using the sorin theme but am a little dissatisfied with it. I\'d like to switch

相关标签:
5条回答
  • 2021-01-31 23:18

    If you're a macOS user, the Powerline glyphs are now built-in to iTerm (as of 3.3.7, 17 Nov 2019) but disabled by default.

    You can enable the fonts by toggling the checkbox in iTerm > Preferences > Profiles > Text:

    Any newly opened Terminal windows will render supported Unicode characters as glyphs, as shown the following screenshot test.

    $ echo "\ue0b0 \u00b1 \ue0a0 \u27a6 \u2718 \u26a1 \u2699"
    


    If you'd rather manually manage the installation of the Powerline Symbols, you can use Homebrew Casks:

    $ brew tap homebrew/cask-fonts
    
    $ brew cask install font-powerline-symbols
    

    This will install the PowerlineSymbols.otf typeface for you to use system-wide.

    0 讨论(0)
  • 2021-01-31 23:23

    For anyone coming to this later, iTerm2 3.3.7 has a checkbox to use built-in Powerline glyphs. If you're not trying to get too fancy, this is an easy way to get those glyphs.

    Preferences > Profiles > Text > Check that box

    0 讨论(0)
  • 2021-01-31 23:31

    On Windows - just * download some Powerline font like: https://github.com/abertsch/Menlo-for-Powerline/raw/master/Menlo%20for%20Powerline.ttf
    * Install it by clicking the file twice
    * Choose the new font in properties
    That's it!

    0 讨论(0)
  • 2021-01-31 23:32

    It is all about the Powerline symbols.

    To get the Powerline symbols working as mike@Mikes-Laptop.local has:

    1. Download a Powerline font. A good font for downloading can be found at https://github.com/powerline/fonts

    2. Install it by running ./install.sh.

    3. Change the font in your Terminal preferences to use the new Powerline font.

    1. Test! To test the glyphs in a terminal: echo "\ue0b0 \u00b1 \ue0a0 \u27a6 \u2718 \u26a1 \u2699"

    The prior instructions were intended for Mac OS version 10.11 with Terminal, but may work similar for other setups.

    0 讨论(0)
  • 2021-01-31 23:41

    Add on, I am using Hyper and zsh and encountered same problem, solved by editing

    fontFamily: 'Menlo, "DejaVu Sans Mono for Powerline", Consolas, "Lucida Console", monospace',
    

    Just adding the font for powerline into fontFamily.

    0 讨论(0)
提交回复
热议问题