Menuekopf

Montag, 9. März 2026

A few minor improvements for the Ditto Clipboard Manager

Ditto, an awesome clipboard manager for Windows desktop systems, is an open-source project hosted on GitHub. Therefore it's easy for customization.


I've been using Ditto for a long time. I briefly switched to another clipboard viewer, but ultimately returned to Ditto because it simply offers the best overall package for me.


But even good things can be improved, or rather, adapted to your workflow.


There were a few things about Ditto that bothered me, which I've now adjusted and expanded - at least for my own needs.


These functions have been added/improved:


1.) Extended the ChaiScript interface with the following features:


- Images can be copied directly from Ditto to an image editing program using CTRL-E, provided they were copied to the clipboard as real (bitmap) images. However, if you only saved the image file path - or a copy of a file - in Ditto, this doesn't work. I've added a function that returns the file path so that image files that only contain a reference to the file path can be directly passed to an image editing program (perhaps this is very specific, but since I often have to exchange graphic files with graphic designers, I frequently work with file paths).


- Similarly, I can now directly forward email addresses to the default mail client on my system. Of course, pasting and copying, as well as opening the email client, will serve their purpose, but a shortcut is always faster.


- And finally, I can, for example, associate URLs with a tool of my choice via a shell command by integration of an external caller. This allows me to pass clip content - like the file path based images above, but also URLs - to an external application of my choice via ChaiScripts.


- Duplicate check: While Ditto allows you to disable the 'Allow Duplicates' option in the advanced settings, this setting had no effect when clips were moved directly to a specific folder upon import via the ChaiScript interface. This does not work because the ChaiScript On Copy Scripts interface is called in the OnCopy event before the duplicate check takes place. Therefore, over time I accumulated a lot of duplicates, as I frequently copy URLs that have been moved to special URL folders via ChaiScript. That was very annoying.


I've extended the ChaiScript interface with a corresponding command so that I can now prevent clip duplication using an if statement in the On Copy (Chai)Script if the clip already exists in the database:


if(clip.IsDuplicate() == 1) { return true; }




2.) Image Viewer (Image Preview):


While Ditto's integrated image preview offers the option to adjust the images to the preview window size, this didn't always work depending on the image dimensions. I've improved this somewhat and also implemented zooming, unzooming, and resetting via keyboard commands ('+': Zoom In, '-': Zoom Out, '*': Fit Image to Window, CTRL + '*': Size Window To Content, SHIFT + CTRL + '*': Full Window Size Mode). Therefore, I don't need to zoom with the mouse wheel, which is of course also possible without any problems, but I prefer to operate such productivity tools exclusively with the keyboard.



3.) ListView Icons:


Perhaps an unnecessary gimmick, but it helps me to better visually categorize clips. The following clip types can be identified using special ListView icons:


  • Email Addresses
  • URL Addresses
  • Image Clips
  • File-Based Clips
  • HTML-Formatted Clips
  • RTF Clips
  • Text Clips


This might not sound like many distinctions, but it does help to differentiate between clips. These ListView icons are optional, you can enable/disable them. Plus they can optionally be displayed in an adaptive style (at the Ditto advanced settings). On dark themes, the icons will then be displayed transparently. Otherwise, they will be displayed in black and white in dark mode.



4.) Optional URL Access via Double-Click:


Normally, double-clicking a clip pastes it into the target window. I've now implemented an option so that double-clicking while holding down SHIFT and CTRL allows me to directly open the URL in my default browser. It's certainly not a game-changer, but since many applications allow you to open URLs directly with a double-click, there's no reason not to handle it similarly in Ditto.


Conclusion:


As you can see, it's possible to polish Ditto a bit and better adapt it to your own workflow. It's an older C++ MFC application, which in 2026 might mean having to familiarize yourself with the old C++ code.
I used Visual Studio 2026 as the development environment for my modifications, which works well, even though, to my knowledge, the Ditto project was last developed with Visual Studio 2016 or 2022.

When installing Visual Studio, there are a few things to keep in mind, as the setup program in the default installation doesn't support all the necessary libraries.

So far, I haven't fully committed my extensions to my GitHub fork nor submitted a pull request. I did ask in the Ditto issue tracker whether users would like a pull request. However, since there was no response and committing the modified source code and getting approval from the maintainer is somewhat time-consuming, I haven't seen any reason to do so yet. If I find the time, I will certainly make a few more minor changes and perhaps submit a pull request.

Open source always depends to some extent on its users and feedback; if this is lacking, it's simply not there.


Keine Kommentare: