All posts by Oliver Sauder

Polishing Diodon and moving to git

Yes, Diodon is still alive and swimming through the oceans of clipboards. I have released a new version 1.6.0 today with several neat changes. I only want to highlight a few but you can find a full list here.

vi like scrolling in clipboard menu

One neat feature is the vi like scrolling in the clipboard menu. Usually when you open the clipboard menu with Ctrl+Alt+V you had to use the arrow keys up and down to browse through the list. Those arrow keys are usually far away on the keyboard and are therefore not so convenient to use. Hence the Diodon release 1.6.0 introduces additional scrolling with the letter j and k. No more moving around with your hand uncontrollably. Nice right?

Warning when in privacy mode

As described in previous blog post Diodon respects the privacy setting of the desktop environment. Even though this is a neat feature it has been confusing at times as it was not clear why clipboard items have not been added to history. Hence with this new release a warning will be shown at beginning of clipboard menu when privacy mode prevents clipboard items to be added to history. Hope this will clear up the mystery this feature had in the past.

You can either download new release as tarball or install it through the ppa with the 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

Moving to git and how to contribute

As Launchpad now also allows hosting of Git repositories I’ve moved the Diodon source code to git. So if you want to contribute you simply:

git clone https://git.launchpad.net/diodon

and have a look at known bugs, assign bug to you and start coding. Once you are done with your changes create a patch with the following:

git format-patch master --stdout > new-patch.patch

and attach it to the respective bug report. I hope this move will make it easier to contribute. Thanks for your contributions in advance.

Small bug fix release Diodon 1.5.0

After a while of silence there is now a new Diodon version 1.5.0 available. It brings some small fixes and is also available for Ubuntu 16.04 in the stable ppa.

Following has been fixed:

  • #1502486 Diodon status bar icon cropped in gnome-flashback session
  • #1525071 Add link how to configure hotkey to preferences
  • #1562563 desktop file validation fails
  • #1541071 Expose ZeitgeistClipboardStorage.get_item_by_checksum

As always can you either download it as tarball or install it through the ppa with the 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

Last but not least – happy pasting and let me know if you have any feedback.

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!

Using Custom Shortcuts of DE as Diodon hotkey

A hotkey feature to open the clipboard history has been available in Diodon since its very first version and is a major part of its usability. Unfortunately this hotkey has not always worked as expected, causing issues on certain desktop environments or stopped working altogether caused by regressions of updated libraries. Furthermore did customization of the hotkey not always work like when using Symbols or sometimes even the order how the keys were pressed mattered. All in all has this feature not been very stable. The main underlying problem for this is that there is no standard across desktop environments to register global hotkeys.

Looking at all those issues it is kind of obvious that handling of a hotkey should not be the responsibility of Diodon but be handled by the desktop environment itself. Therefore the decision has been made to drop the internal Diodon hotkey feature altogether as per version 1.4.0. Instead does a custom shortcut need to be registered through the settings offered by whatever desktop environment you use.

For GNOME/Unity this can be done by opening Keyboard app through the Dash/Activities overview. There you go to Shortcuts -> Custom Shortcuts and add a new one with the name “Diodon” and command “/usr/bin/diodon”. Afterwards assign your preferred hotkey and you are done.
Custom-Shortcut-Diodon

If you are experiencing a hotkey issue with the current Diodon version you use you can already do this.

Unfortunately for Diodon at this point it is not possible to register this Custom Shortcut during package installation. So as of version 1.4.0 registration of a hotkey needs to be done manually. Additionally will also the special keybinding to browse through the history not work anymore as Diodon doesn’t know anymore what keybinding was used. (Of course you can still use the up and down keys to cycle through the history.)
We believe though the additional stability in the hotkey feature it makes up for this one-time manual step. Also we are working together with upstream of the different DEs so hopefully in future versions of Diodon this custom shortcut registration can also be done automatically during package installation again.

If you have any questions or concerns about this change leave a comment – feedback is always appreciated. And if you actually know a way how an application could register a custom shortcut during installation best have a look at this question.

A stability release – Diodon 1.3.0

After a long time of silence have we released a new Diodon version 1.3.0 focusing on stability of the clipboard manager. You can find a extensive list of what has been changed on the release 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

I herewith also specifically wanted to take the opportunity to say thanks to you all reporting bugs. All those reports are really helpful and essential to make Diodon better. Also if in the future Diodon doesn’t behave as you expect it to, please do not hesitate to report it.

This said happy copying and there are certainly more Diodon versions coming up in the future.