Since PuTTY tray (which I have been using for this functionality so far) has been discontinued, I decided to port its clickable link functionality to PuTTY 0.61 myself.
For some reason the code (which originally comes from Nutty) was written in C++ while PuTTY is written in C, so I rewrote the C++ parts in C at the same time. This means it should be at least a little bit closer to a possible inclusion in PuTTY.
What I’ve done:
- Ported C++ parts to C
- Launching the URL now uses ShellExecute directly, meaning any type of URL should work (e.g. spotify) when using an appropriate regex.
- Set default font to Consolas and enable ClearType on Vista and later (kept from PuTTY Tray)
- Change icons to the ones from PuTTY Tray (I like them better)
- Patch the build Recipe so that you can make a patched build using PuTTY’s build system
- Bugfix: Clicking a wrapped link with the window scrolled up should now work as expected
To build it yourself (using mingw on linux):
- Download the PuTTY source and the patch
- Unpack the source and apply the patch:
tar xzf putty-0.61.tar.gz; cd putty-0.61; patch -p1 < ../putty-tobbez-0.61-r1.patch
- Drop the replacement icons into the
windows/subdirectory if you want them.
- Generate build files:
- Export the
TOOLPATHvariable so that the variables CC and RC in windows/Makefile.cyg to point to your tools (for me it was
- Build it:
cd windows; make -f Makefile.cyg
- The executable has been created in the same folder.