I am rediscovering the joys of the command line.
After a couple years of service, my laptop was getting sluggish. After the delays finally became intolerable, I ordered a new hard drive and reinstalled my system from scratch. In addition to making the laptop faster, the process has gotten me to reexamine some tools I had previously neglected.
Chief among these is Cygwin. Linux has a lot of useful command line tools, and Cygwin makes these tools available for Windows. I use it to get the weather, manage a todo list, download files, do math, and even send updates to Twitter. Why use the command line for these tasks, when there are good graphical ways of doing them? Because it’s really, really fast.
The command line drops down over my other windows, like a video game console, at the press of a simple keyboard shortcut. Then it’s just a matter of typing in what I want.
I’ve written about how to set this up before, but a few things have changed since then. Here’s how to set up a Quake-style dropdown command line.
-
Install Cygwin. I use the e text-editor, which automatically installs Cygwin with a bunch of useful packages in order to enable its more advanced features.
-
Install AutoHotkey. (By the way, this program has a lot more uses than just this drop-down command line. It’s something I know I haven’t explored to its full potential yet.)
-
Install Console2. This is a free and open source console program, which is much prettier than the standard Windows Command Prompt tool. You’ll want to install the latest beta version of the software (the stable version hasn’t been updated in years). For reference, I’m using Beta #144.
-
Download console.xml and consolecywgin.xml and put them in the same folder as Console2, replacing the console.xml file that is already there.
-
In the Console2 folder, right click on Console2.exe and click Create Shortcut. Rename it consolecygwin.
-
Right click that shortcut and click Properties. In the “Target” field, add
-c consolecygwin.xmlafter the final quotation mark. Click OK. -
Open Autohotkey if it isn’t open already. Right-click on the Autohotkey icon in the system tray and click Edit Script.
-
Copy and paste the contents of this file to the end of the AutoHotkey.ahk file that appears.
-
Save and close the AutoHotkey.ahk file. Right click the Autohotkey icon and click Reload This Script.
Now if you hit the Windows Key and the ~ key, you’ll get a regular old DOS prompt. Hit Windows Key + Shift + ~, you’ll get the Cygwin prompt. Type exit into either prompt to make it go away. Press escape to hide the prompt, and press either of the hotkeys mentioned above to bring it back.
In my next post, I’ll go into how to set up some of the neat commands I mentioned earlier.

MaximumFish
November 10, 2010 at 9:48 am
Thanks for this, it’ll come in very handy I’m sure!
As part of my learning AutoHotkey I’ve spent a few hours improving your script a little. Changes I’ve made are:
- All hotkeys now detect the window that was active before opening the Console, and switch back to that window when it’s hidden. This favours the Window Title, but will use the Class if a title doesn’t exist.
- Made WIN+SHIFT+~ detect if the Windows command console is running, and switch to Cygwin if it is. If a Cygwin console is already running, it just hides/unhides that instance.
- Added a WIN+CTRL+~ hotkey to do the same as above, but for the Windows console.
- Put most of the above into subroutines to keep the script as small and tidy as possible.
If you’re interested in my changes I’d be happy to share them with you! Just send me an email.
Patrick Forkin
July 13, 2011 at 7:00 am
Hallo!
First my site is naked, but the content is coming, in Engish and German. Your blog and its recommendations have more to offer than most recognise. I am a writer and not a programmer. All that I will be able to do, has to come from the cmd-line and the concept of one-liners. I am putting together a personal form of an IDE to realise it. I would like to dialogue with you.
Regards, Patrick Forkin.
Alexei Michaelovich
August 22, 2011 at 9:49 pm
Cool stuff. As a linux user who occasionally needs to go into windows, this is a nice thing to have. One thing I would change about your script though: Use Progman as the process to activate on hide rather than Shell_TrayWnd. That way you still can have it set up based on if WinActive, but activating the tray won’t seem janky to people like me who like to hide the tray.
adam
September 17, 2011 at 1:48 pm
Could you please upload the files so that I can just download them or copy and paste. The syntax does not transfer over with the current setup. Or if it is easier you can email it to xcstormerlife@netscape.net thank you