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.
