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.
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.
- Close Babun
- Create an environment variable for HOME = C:/Users/my_account_name
- Press the windows key and type env
- Open ‘Edit envirnoment variables for your account’
- Create a new variable with HOME as variable name and C:/Users/my_account_name as variable value
- Open Babun and run babun install
- 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.
You rocks man !
You saved me hours \o/
i love you
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.
So cool
Excellent write up. Worked perfectly.
Thank you
I am unable to see this when I ssh into remote machine. How can I achieve this same on ssh.
Do the same procedure in the virtual machine. It’s like different computer from the one where you set this up.
This helped me a lot, thanks.
I love my Babun now!
I loved this post. Good work.
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.
Thanks a lot, good post on the subject!
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
I haven’t had any issues with speed so I cannot really help you here.
why are “name@pc-name” before part blue color
I f’ing love you for this post!!!
How to get these blue and orange colors with git marker at master?
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.
To show the blue/orange colors you should use the agnoster theme. Remember to run source ~/.zshrc once you have made your changes.