Dropdown cygwin terminal in Windows 7

The Linux commmand line is powerful, and if you try it for five minutes you’ll see that Windows’ cmd (a reminiscence of DOS) is depressingly limiting. Cygwin comes to fix that.

In this post you’ll learn how to make your console looks like this:
Desktop preview, YMMV

Important: this post was made for x64 installations, but it can be easily adapted to 32 bits. Leave a comment if you need help!

Installing Cygwin

Installing Cygwin is as easy as downloading and running the installer from its website.
If you open Cygwin at this point it looks pretty boring:
Pretty boring.

Dropdown terminal

ConEmuI’ve tried many alternatives to the standard Cygwin terminal, and the most powerful was ConEmu. Go to the download page, grab your copy and install it. You can spend the next five hours playing with the settings, ConEmu is really customizable.

To ease your pain, I exported my configuration file so you have something to start with. I changed the default font to Deja Vu Sans Mono (which has an awful download page) so it supports unicode characters. I repacked the font and made it simpler for you, here:

To install the font just drop all the files from the zip in C:\Windows\Fonts – then you can proceed with the configuration!

To import the xml file with ConEmu’s settings, unzip it, open ConEmu, go to Settings and click the import button:
ConEmu settingsOnce you import ConEmu.xml, your console will start looking like a dropdown terminal. It can even be toggled with F9 (you can change this shortcut from ConEmu’s settings).

Spawning ConEmu when it’s not running (optional)

AutoHotKeyUnless you add ConEmu to your startup applications, it won’t respond to F9 until you manually open the application. It won’t reappear after you exit/close the last tab neither.

If you are willing to install AutoHotKey (I use it for things like mapping my caps lock key) you can make a smarter (?) F9 shortcut which opens ConEmu if it’s not running. Here’s the script I made:

apt-cyg

apt-cygTo add new packages to Cygwin you’d have to run again the setup and choose what you want to install. After doing that a couple of times it gets tedious. This wonderful package manager comes to solve that problem: apt-cyg resembles apt-get and installing new packages becomes as simple as apt-cyg install nano

apt-cyg is easy to install:
wget rawgit.com/transcode-open/apt-cyg/master/apt-cyg
install apt-cyg /bin

zsh / oh-my-zsh

If you’d like to use zsh it’s as easy as installing it with apt-cyg:
apt-cyg install zsh
Although you could edit ConEmu’s settings to launch zsh directly, you should know that it won’t render unicode characters properly (if you know how to fix this please leave a comment!). To circumvent this problem you can launch zsh from within sh (and even launch it automatically by adding zsh to your .bashrc -yes, it’s a dirty workaround-).

oh-my-zsh

To install oh-my-zsh follow the instructions on the official repository. You may need to install Git first (apt-cyg install git).

In case you are wondering, I’m using the theme sorin.

FAQ

  • Why are you using F9 instead of `?
    I use the ` key when I write stuff in MarkDown. The F-keys are rarely used.
    (tip: you can see what function keys you aren’t using by looking at the dust on the keycaps!)

  • Is there something like this for Linux?
    Take a look at Guake (it’s the reason why I wanted a dropdown console in the first place!)

  • Awesome guide, I feel *almost* at home in Windows now.

  • kterry

    Wonderful. It works like a charm. Thanks!