Yakuake For Windows

Filed in Software Developement 5 Comments

I know a lot of people will be searching for this title, so hopefully google directs them here so that they can quickly apply this solution to their “problem”

First off, this is *NOT* an actual version of yakuake for windows, for that you will have to wait for the required KDE libraries to be ported to windows, and then likely some yakuake adjustments.  It is coming, but i have no idea what the time frame is, it may be a while and my solution is ready, working, and available now.

The solution i have come up with comes from reading another blog, and although i am partially stealing what he has done (at least i give him credit for figuring most of this stuff out), there are a few things that make my solution a little better.  The original article can be found HERE, and i suggest you read it for extra information if you want to know how i began figuring t his out.  The original solution uses an older version of console, and does not provide the source for the AutoHotkey source (which can be useful if you want to customize further, like a custom installation path).

Now onto my solution. There are three parts to the solution, AutoHotkey + Console2 + Cygwin.  Cygwin is not necessary if you don’t want it, but i recommend it for any terminal like scripting.

We start off with the AutoHotkey program.  This program basically allows you to add global hotkey scripts to your windows OS by running a script that you compile into a daemon-like program.  The file included in this zip file (*.ahk) is the source for this script, and you can modify it to your liking if you don’t like how i did it.  Basically, the script will try and activate the console window if it is hidden and hide it if it is visible, if the console window doesn’t exist then a command is run (to start the console program).  Pretty simple stuff.  F12 key is the global hotkey assigned to this script.  If you want to make changes to the script, you will have to grab the installer or the zip file from the AutoHotkey Downloads page and recompile your changes with the included compiler.  The included compiled hotkey program is called CygTERM.exe and it runs in the background so you will need to use taskmanager to kill it (if necessary).

Next up is Console2.  Not much to say about this other than it is a pretty decent tabbed console.  It has a lot of features which offer a lot of customizability (something i was looking for).  The most important features i found were transparency, tabs, slab mode (no window decorations), and custom shell (cygwin’s bash instead of the default).  Basically this is configurable enough to be made into a nice yakuake style window (though no animations on show/hide, but who really wants that anyways!).  The config i provided is pretty good, but it is designed for a specific resolution, you can tweak it to your needs using the built-in configuration editor (use the right click menu).  Because the location of Console2 is compiled into the AutoH0tkey script, that means you will have to install this to C:\Program Files\Console2.  Alternatively you can recompile your custom location into a new hotkey program.

Finally, Cygwin.  I am not going to explain cygwin beyond that it allows you to run posix programs in windows, most importantly the BASH shell.  BASH allows you to do complex scripting and can save you gratuitous amounts of time when doing any sort of text processing (among other things).

Combine all of these together and you have the basic workings of a windows version of yakuake.  Because of the way console2 works, you won’t be able to totally fill the desktop area with the terminal window, but you can come pretty close using the inside_border option.

Anyways, feel free to try this out at your leisure, i hope that it is everything that you need it to be until yakuake on kde4 is available on windows.

In case you have trouble figuring things out, here are the simple install instructions:

  1. Extract the zip archive to C:\Program Files
  2. Run C:\Program Files\Console2\CygTERM.exe
  3. Hit F12
  4. (Optionally) edit your Console2 configuration settings

Here is an updated CygTERM.ahk file (the one you compile into CygTERM.exe).  This updated script will fix most of the focus bugs (if you have noticed any).  The focus bugs may occur with multi-monitor or multi-desktop (VirtuaWin) environments.


DetectHiddenWindows, on

IfWinExist CygTERM
    IfWinActive CygTERM
        WinHide, CygTERM
        DetectHiddenWindows, off
        Send !{Tab}
        WinShow, CygTERM
        WinActivate CygTERM
    Run C:\Program Files\Console2\Console.exe
    WinWait CygTERM