How often do you need to get in and out of your terminal as quickly as possible? I use Cygwin for Linux emulation under Windows and MinTTY as my terminal of choice. MinTTY is great as it supports semi-transparent backgrounds and fullscreen mode (and lots more, be sure to check out the homepage). It is so tiny I don’t mind having a copy of it running at all times, however it bugs me when I see its icon on the taskbar. The following is an AutoHotkey script which launches a new MinTTY window, if one is not started already, sets it up in fullscreen mode and lets you do your work until you press Win+C again to send it to the background and remove all traces of it on your desktop.
If you haven’t used AutoHotkey before make sure you download a copy. You most definitely will find some use for it.
As for the script, it is possible to tweak it so the window is only taking half the screen and slides in from the top (ah, Mac envy). I leave that for you to figure out.
If you are like me, you do a lot of terminal work and cd is your friend (or enemy). I was getting really tired to cd /home/stan/projects/important-project/src/ every time I launch my shell. It’s bad enough when you have one project to work on, but as things get scattered, you tend to do more directory traversing than actual coding.
Up until recently I was using go-tool. From the website:
go is a small shell command for changing directories quickly. Typically you have a set of directories that you work in. Typing out the names of those dirs in full can be tedious. go allows you to give a shortcut name for a directory – say ko for D:\trentm\main\Apps\Komodo-devel [..]
It’s a great tool, but it doesn’t work with Zsh out-of-the box (trivial to modify the Bash example to fake it). It’s also based on Python and can be very slow when using it in a fresh terminal window. I really needed a solution that was native and didn’t require a lot of effort to set up.
The ‘Thin’ Option
I stumbled upon Ivan Čukić’s excellent blog post. It’s so cool, I couldn’t resist trying it. I took the functions and tweaked the path where the database is stored and how it is accessed. This is a better solution compared to go and as a bonus it also offers auto-completion:
How to Use It
Paste the above code at the bottom of your ~/.zshrc file. Restart your terminal and run cdb_edit. This should bring up an empty buffer in your $EDITOR. To define shortcuts, use shortcut absolute/path. Here is an example file:
I have been going through the existing GitHub page for building node.js on Cygwin/Windows adding my own comments/steps and missing packages. I believe this is now a full set of instructions that should get you cracking pretty quickly from scratch.
I just realised many, if not most, Cygwin users stick with their default terminal which is the Cygwin Bash Shell. I never understood why this is the default with each installation. It is no better than Command Prompt – horizontal window resizing is out of the question, custom fonts are limited and mouse support is, well… missing.
If you have used PuTTY to connect to remote machines, you would love MinTTY. It is based on code from PuTTY 0.60. Features as seen on the project’s homepage include:
Native Windows user interface that tries to keep things simple.
Support for UTF-8, CJK fonts, and Windows IMEs.
Drag & drop and copy & paste of text, files and folders. (Files and folders are inserted as quoted filenames.)
Extensive mouse support, e.g. mousewheel scrolling in less and opening files and URLs with Ctrl+click
Window transparency, including glass effect on Vista and 7.
Small program size and uick scrolling.
I encourage you to try Zsh as an alternative to Bash (the default). Bash is fine, but if you are looking for better history management, lots of plug-ins and options for customisations you need to move on. Check out oh-my-zsh for a collection of such add-ons.
You can install MinTTY and ZSH using Cygwin’s setup.exe.
MinTTY at your fingertips
Having a terminal keystroke away is essential in my day-to-day work. I need to be able to quickly get in and out of it – read how to do it.