Soren Dam
  • Blog
  • Contact

Take control of your console in Windows with Babun, Oh My Zsh, and Powerline fonts

September 23, 2015

By Søren Friis Dam

I accidentally stumbled upon a console named Babun. It is based on Cygwin so if you like a Linux like environment you should definitely check it out. It comes with a lot of cool packages installed and uses the fabulous oh-my-zsh as default shell.

Download Babun and run install.bat – wait for a couple of minutes. Once installation has finished Babun will automatically start.

To style Babun edit the oh-my-zsh configuration by typing nano .zshrc .  Look for ZSH_THEME=”babun” and change it to whatever theme you like (you can list all themes with the command ls -l ~/.oh-my-zsh/themes ). Personally, I’m a fan of the them agnoster so I have change the line in the oh-my-zsh configuration file to ZSH_THEME=”agnoster”.

Now either close the all instances of Babun and reopen or run the command source ~/.zshrc  to invoke the changes. At this point you will probably see some strange icons if you use the agnoster theme. This is due to the fact this theme uses the Powerline fonts.

So go ahead and visit the Powerline git reposity. Naviage to the font you like – I use DejaVu Sans Mono – and download it by clicking it and then clicking raw. Once downloaded install the font in Windows. Navigate to your fonts and find the font to check the name of it. In my case it is DejaVu Sans Mono for Powerline.

Once the font is install you need to tell Babun to use it. In Babun type nano ~/.minttyrc   and copy/paste the below into the file (you paste by right clicking).

BoldAsFont=no
Columns=150
Rows=55
Font=DejaVu Sans Mono for Powerline
FontHeight=10
Transparency=low

ForegroundColour=#A0A0A0
BackgroundColour=#1B1D1E
CursorColour=#A0A0A0
Black=#1B1D1E
Red=#F92672
Green=#82B414
Yellow=#FD971F
Blue=#268BD2
Magenta=#8C54FE
Cyan=#56C2D6
White=#CCCCC6
BoldRed=#FF5995
BoldBlack=#505354
BoldGreen=#B7EB46
BoldYellow=#FEED6C
BoldBlue=#62ADE3
BoldMagenta=#BFA0FE
BoldCyan=#94D8E5
BoldWhite=#F8F8F2

Once you have pasted it save the file by pressing ctrl+x – press y for yes – press enter to overwrite. Now quit Babun and restart it. you should now be using the Powerline font and everything should look like the screenshot below.

Babun with oh-my-zsh and powerline fonts

To remove the user name (like on the image above) set DEFAULT_USER  in ~/.zshrc . The line is probably not there so you should just add it like this DEFAULT_USER=yourusername

Set Babun home directory to Windows user home directory

You might want to set the home directory to your current windows user. This can be done via these simple steps.

  1. Close Babun
  2. Create an environment variable for HOME = C:/Users/my_account_name
    1. Press the windows key and type env
    2. Open ‘Edit envirnoment variables for your account’
    3. Create a new variable with HOME as variable name and C:/Users/my_account_name as variable value
  3. Open Babun and run babun install
  4. Restart Babun

If you experience some issues with zsh after this try running these commands

compaudit | xargs chmod g-w
cp ~/.zcompdump{,-$HOSTNAME-$ZSH_VERSION}

This fixed it for me.

19 responses to “Take control of your console in Windows with Babun, Oh My Zsh, and Powerline fonts”

  1. spritus says:
    April 12, 2018 at 20:34

    You rocks man !
    You saved me hours \o/

    Reply
  2. Jacques says:
    March 16, 2018 at 13:40

    i love you

    Reply
  3. Pingback: oh-my-zsh mit Agnoster Theme für Windows installieren – Webdevelopment
  4. Sayyed Ehsan Taheri Javid says:
    December 9, 2017 at 21:47

    Thanks a lot for your article. I searched so much to find a way to change or remove hostname, and I’ve found it here.

    Reply
  5. Scott Hsu says:
    July 21, 2017 at 10:41

    So cool

    Reply
  6. Darius says:
    February 10, 2017 at 18:12

    Excellent write up. Worked perfectly.
    Thank you

    Reply
  7. Pre says:
    December 20, 2016 at 17:03

    I am unable to see this when I ssh into remote machine. How can I achieve this same on ssh.

    Reply
    1. Petar says:
      April 14, 2017 at 19:36

      Do the same procedure in the virtual machine. It’s like different computer from the one where you set this up.

      Reply
  8. Romaric says:
    December 7, 2016 at 15:25

    This helped me a lot, thanks.
    I love my Babun now!

    Reply
  9. Ramesh says:
    October 25, 2016 at 12:00

    I loved this post. Good work.

    Reply
  10. saikat says:
    July 30, 2016 at 04:34

    was looking for an awesome post like this!
    I have customized this look of the zsh agnoster theme in babun shell
    and it looks like this => https://www.dropbox.com/s/5mq3lxzw5utfyim/zsh-windoze-edited.png

    you can download my custom settings here
    here

    Thanks.

    Reply
  11. Laurent says:
    June 25, 2016 at 07:55

    Thanks a lot, good post on the subject!

    Reply
  12. timsan says:
    April 6, 2016 at 11:52

    Tried it out looks great! However, this theme is extremely slow in babun when inside a git directory, did you experience this? If so, did you solve it? It’s currently unusable, it takes about 5 seconds to display the prompt

    Reply
    1. Søren Friis Dam says:
      April 14, 2016 at 21:06

      I haven’t had any issues with speed so I cannot really help you here.

      Reply
  13. name pc says:
    March 30, 2016 at 06:07

    why are “name@pc-name” before part blue color

    Reply
  14. Pingback: Text Editor ผู้ช่วยยามเมากาวว | programmer9468
  15. Swapnil Singh says:
    January 31, 2016 at 15:33

    I f’ing love you for this post!!!

    Reply
  16. pawel says:
    January 20, 2016 at 17:01

    How to get these blue and orange colors with git marker at master?

    Reply
    1. Søren Friis Dam says:
      January 21, 2016 at 10:34

      The git markers are characters in the powerline font. To see git stuff you need to load the git plugin in the oh-my-zsh configuration (nano ~/.zshrc) like so.

      # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
      # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
      # Example format: plugins=(rails git textmate ruby lighthouse)
      # Add wisely, as too many plugins slow down shell startup.
      plugins=(git)

      To show the blue/orange colors you should use the agnoster theme. Remember to run source ~/.zshrc once you have made your changes.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Contact
  • © 2025 Søren Friis Dam