Diodon release 1.4.0 and new advanced features

It’s time for a new Diodon release 1.4.0 which comes with a major change how keybindings are handled as described in a previous post (please read before updating!) but also fixing some annoying issues such as Diodon blocking to logout.

You can find a full list of changes on the milestone page.

You can either download the new version as a tarball or if you use Ubuntu or an Ubuntu based distribution use the stable ppa by running following commands:

sudo apt-add-repository ppa:diodon-team/stable
sudo apt-get update
sudo apt-get install diodon
# and for all Unity users there is also a scope
sudo apt-get install unity-scope-diodon

Once this is done and you have registered your keybinding with your DE you are good to go to continue using new Diodon version. In case you are interested in two new advanced features continue reading to figure out how you can filter clipboard items by regex or adding customized application paste keybinding.

Filter clipboard items by regex pattern

I have come across the request that whitespace clipboard items should be filtered out – which made total sense to me. While implementing I kind of thought though wouldn’t it be great to have the ability to filter out any unwanted clipboard items by a regex? I am sure you have a use case for this. So from Diodon version 1.4.0 onward there is now a setting you can change with the following:

gsettings set net.launchpad.Diodon.clipboard filter-pattern "^\s$"

“^\s$” is the default pattern which filters out all whitespace items. You can change it though to anything you want it to be. To note is that all items are filtered out which match configured regex. For more details how you can create your customized regex best have a read on this article.
If you have any use cases where this feature comes in handy, please share your regex in the comment section so others can profit as well.

Configure customized application paste keystroke

Per default for Diodon to be able to automatically paste clipboard content into the active application it simulates a Ctrl+V keystroke. This works in most applications as this is the default way to paste clipboard content. However there are some exceptions for example GNOME Terminal where not Ctrl+V is used to paste but Ctrl+Shift+v. So in such application automatically pasting content doesn’t work.
To overcome this there is now a list of applications where a different keybinding needs to be used for pasting. For now only GNOME Terminal is added but if you have any other application with the same issue you can add more application with the following command:

gsettings set net.launchpad.Diodon.clipboard app-paste-keybindings "['/usr/bin/gnome-terminal|<Shift><Ctrl>V', '/usr/lib/gnome-terminal/gnome-terminal-server|<Shift><Ctrl>V', '/path/to/app|keybinding']"

Now replace /path/to/app with the path of the application you need a different paste keybinding, separate it with a pipe character | and assign afterwards the desired keybinding e.g. <Shift><Ctrl>V. You can of course add as many keybinding to this array as you need to.

In case you have an application where this workaround is needed to make automatically pasting possible please let us us know so we can add it for future releases.

As always please let us know if you have any feedback or issues. Thanks for your support. Cheers!