Hello! I’d like to write a little frontend for klipper, KDE’s clipboard manager. I can access its content with qdbus:

qdbus org.kde.klipper  /klipper org.kde.klipper.klipper.getClipboardHistoryMenu

qdbus org.kde.klipper  /klipper org.kde.klipper.klipper.getClipboardHistoryItem 5

but how can I activate the selected item, placing it first? If it’s only text, I can do this:

qdbus org.kde.klipper  /klipper org.kde.klipper.klipper.setClipboardContents "$(qdbus org.kde.klipper  /klipper org.kde.klipper.klipper.getClipboardHistoryItem 5)"

but what if it has a different MIME type, like an image or a file? Is there a way to tell klipper “activate element 5”?