• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » How to Install Powerline Fonts, Symbols for Bash on Windows 10

By Abhishek Ghosh January 1, 2018 7:41 pm Updated on January 1, 2018

How to Install Powerline Fonts, Symbols for Bash on Windows 10

Advertisement

In our previous guide on Bash, ZSH, Hyper Terminal on Windows 10 setup we we almost closer to Mac’s iTerm. The next guide was on installing Python from that bash in unix style. Installing Powerline Fonts on Windows 10 Needed To Show Glyphs Properly. Here is How to Install Powerline Fonts, Symbols for Bash on Windows 10. This part often improperly written in most guides. It is very difficult unless both UNIX and Windows system is known. I am no way master of both system but this guide will definitely help you.

This guide will help to get rid off troubles like odd [] like glyphs on either Ubuntu Bash or Hyper Terminal. What is this Powerline? You better look at our old guide on how to install Powerline on Mac. It was basically a ZSH (Oh-My-ZSH) for iTerm2 like beautiful Terminal of Mac. Slowly the thing became for GNU/Linux, Windows 10 computers as all now have unix like part. It is for decoration purpose. As because most of the Windows 10 portable computers has pathetic display, the end result of color output is not exactly like Mac or having a great 4K display. This is what you’ll get end of this tutorial :

How to Install Powerline Fonts Symbols for Bash on Windows 10

Click here for full sized screenshot.

Advertisement

---

 

How to Install Powerline Fonts, Symbols for Bash on Windows 10

 

You need Python, pip to have installed on the system. Our old guide on installing Python from that bash in unix style is correct step. I am going to the details of Font installation part on Windows 10 environment as second part as many readers basically can not configure the setup to use so powerful font.

Next we need to run some commands to install few things :

Vim
1
sudo apt-get install python-fontforge python-pip python-dev libfreetype6-dev fonts-powerline

Then you need to install this Powrline shell like Linux :

Vim
1
https://github.com/b-ryan/powerline-shell

Run these commands to install the latest build (instead, you can use pip as written in their document) :

Vim
1
2
3
4
5
6
cd ~
mkdir src
cd src
git clone https://github.com/banga/powerline-shell
cd powerline-shell
python setup.py install

Add the following to your .bashrc :

Vim
1
2
3
4
5
6
7
function _update_ps1() {
    PS1="$(powerline-shell $?)"
}
 
if [ "$TERM" != "linux" ]; then
    PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi

Add the following to your .zshrc:

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function powerline_precmd() {
    PS1="$(powerline-shell --shell zsh $?)"
}
 
function install_powerline_precmd() {
  for s in "${precmd_functions[@]}"; do
    if [ "$s" = "powerline_precmd" ]; then
      return
    fi
  done
  precmd_functions+=(powerline_precmd)
}
 
if [ "$TERM" != "linux" ]; then
    install_powerline_precmd
fi

Next reload them :

Vim
1
2
source ~/.zshrc
source ~/.bashrc

Although we installed Powerline Font via aptitude above, we actually need to follow the git clone way :

Vim
1
2
3
4
5
6
# https://github.com/powerline/fonts
cd ~
git clone https://github.com/powerline/fonts.git --depth=1
# install
cd fonts
./install.sh

Now the fun is that, you need to open Windows Explorer to go to that fonts directory (although technically you can git clone somewhere else to do these steps, it gave me huge fun). Copy-paste the location on Windows Explorer and hit Enter :

Vim
1
%localappdata%lxsshome

You’ll be at your username directory. Go one level up to lxss directory. You’ll find the root directory. If that root was you, then under root you’ll find the cloned Fonts directory. Inside that Fonts directory there will be Install Windows PowerShell Script (which will appear on Bash as install.psl).

Right click on that Install Windows PowerShell Script and run it. It will peculiarly get installed evoking lot of Windows. It is basically for filling the gap in between Linux and Windows.

Now, on Bash windows, right-click to get Properties menu and go to Fonts settings. Select some font like DejaVu Sans Mono for Powerline with Font size around 16.

Now, open Hyper Terminal, go to Edit > Preferences. Change the font, font size there too, like this an example :

// default font size in pixels for all tabs
fontSize: 18,

// font family with optional fallbacks
fontFamily: ‘Inconsolata for Powerline’, font there too :

Vim
1
2
3
4
5
Now you can install this ZSH theme :
 
<pre>
# https://github.com/bhilburn/powerlevel9k
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k

Open ~/.zshrc and change/add these :

Vim
1
2
3
4
ZSH_THEME="powerlevel9k/powerlevel9k"
 
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir rbenv vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( )

The above POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( ) is my own choice. You can look at official guide, which will be :

Vim
1
2
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir rbenv vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs history time)

Now reload ZSH :

Vim
1
source ~/.zshrc

Re-launch the applications, you should get setup like mine.

Tagged With powerline fonts , powerline font , powerline fonts windows , powerline symbols , powerline fonts windows 10 , install powerline fonts windows , windows terminal powerline , powerline fonts windows terminal , powerline font for windows , install powerline fonts windows 10
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to How to Install Powerline Fonts, Symbols for Bash on Windows 10

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • Installing Powerline on OS X 10.10 (Yosemite)

    Here is Step by Step Guide For Installing Powerline on OS X 10.10 (Yosemite) Including Managing the Python Path From Oh My ZSH dot File.

  • OpenShift OctoPress Auto install Script

    OpenShift OctoPress Auto install Script is an Advanced Script to Run OctoPress on Free OpenShift PaaS Practically Without Any Knowing Ruby or Git.

  • Changing Data With cURL for OpenStack Swift (HP Cloud CDN)

    Changing Data With cURL For Object is Quite Easy in OpenStack Swift. Here Are Examples With HP Cloud CDN To Make it Clear. Official Examples Are Bad.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy