Cuterm 2.0

While I was still in school I wrote a tool that I have used ever since. I got the idea from Simon, whom had written a similar tool. It’s a simple command-line tool that sits in the bottom-right corner of the screen and it’s called Cuterm.

The way it works is that you can type folder names, file names, URLs or user-defined commands and it will just run. So if you type an URL it will launch the default web browser and navigate to it. It also has a simple file browser built-in so if you can type a folder name and you can navigate from there to the file you were looking for.

It’s a really useful tool but it’s been ridden with bugs and weird side effects, so I decided to rewrite it in C++ (originally Delphi).

Cuterm in its idle state

Here follows a list of features, new and old:

Alias binding

Instead of having to retype long filenames you can bind them to something shorter and easier to type.

%bind dl D:\Download

This command binds the word "dl" to my default download folder. So by simply typing "dl" I can open it in explorer or by typing "dl" and pressing up I can browse it with the internal file browser.

File browser

The browser has been improved. It now shows a live thumbnail preview of any image you have selected.

Cuterm file browser

You can quickly navigate the list of files by typing in characters. Like explorer if you press B you go to the files starting with the letter B and so forth. It performs a light-weight search algorithm to do this. I made it so that it would fall back on a partial search algorithm if the first one fails. So if I type in the word "Street" it can still locate the file named "169_streetfighter4_om_m1_022808_hd.wmv".

Services

This is a new feature I’ve added. It lets you build more complex commands by offering attributes.

So if I type this:

%service wikipedia http://en.wikipedia.org/wiki/Special:Search?search={0}&go=Go

…I get a new and easy way to search wikipedia:

wikipedia: Johnny Cash

The {0}-part of the URL will be replaced with whatever comes after the colon. You also have the option to type {1}, {2}, etc.. to insert individual attributes.

Send-to operator

I added a new operator (->) which executes whatever is on the right side with whatever is on the left side as an attribute. Basically an "Open with"-command.

Because of the smart parser I can type things like:

(1) D:\Image file.jpg -> photoshop

(2) mp3 -> winamp

(3) D:\mp3\Song.mp3 -> enqueue

(1) will open the image file in photoshop. (2) will open my mp3-folder in Winamp. (3) will send a single mp3 to a service called "enqueue". The enqueue service adds the song to the Winamp playlist rather than open it and thus erasing the existing playlist by calling the winamp executable with the /ADD parameter.

FTP service

As you can see you can use services for more than just linking to online search engines. For instance I found a command-line FTP program (NcFTP) that enabled me to hook it up to Cuterm.

So with a bit of clever binding:

%service myftp file:ncftpput -f login.cfg /temp "{0}"

.. I can now type this:

D:\Some file.jpg -> myftp

..which will upload the file to my ftp server without me having to launch an ftp client. This is really useful to me because I often upload files I want to share with my friends or link to from forums, etc.

Summary

Tools like Cuterm are more than the sum of it’s parts. I’ve used it for years and now it’s even better than before. I’ve been using the send-to operator a lot to do things now and the file browser is the way I navigate my harddrive.

In case you are interested of trying this out, send me an email. It’s stable enough as it is but I haven’t written any documentation for it and it’s designed to suit my needs specifically so your results may vary.

Drive-thru debugging

This is a side note. As I was developing this (and still is to a certain extent) I bound a command; "debug", which would shut down Cuterm and open up the project in Visual Studio.

Once I had fixed the bug I could type in another command; "deploy", which would copy the new version to the correct folder and run it, while shutting down itself (ie. the instance created by Visual studio).

This created an interesting way of debugging. I would encounter a bug, type ‘debug’ and fix it then and there, then deploy it and resume with whatever I was doing before with the newer version running. I call this the drive-thru method of debugging. :D

4 Responses to “Cuterm 2.0”

  1. Pontus said:

    Nov 30, 08 at 18:57

    skulle verkligen vilja testa Cuterm…. lÃ¥ter som nÃ¥got smart och riktigt användbart verktyg.

  2. P said:

    Mar 02, 09 at 16:54

    hittade din blogg av en ren slump. Tycker detta program verkar riktigt intressant. Skulle gärna vilja testa det. Du kan nå mig på swedish_gnome at hotmail dot com

  3. sirGustav said:

    Feb 28, 11 at 20:28

    Denna sortens program kallas för application launchers och wikipedia listar en hög http://en.wikipedia.org/wiki/Comparison_of_application_launchers

  4. Erik Benerdal said:

    Mar 03, 11 at 19:55

    Aha. Jag fick idén från en kompis program, som jag skissade vidare på. Vid det här laget kan jag inte jobba effektive på en dator utan Cuterm.


Leave a Reply