SUMMARY The klipper-managed clipboard can be polled via the DBus org.kde.klipper.klipper.getClipboard* methods. Please add a DBus signal notifying of updated clipboard content so that polling can be avoided.
Can you expand on why you're querying klipper for clipboard instead of just watching the clipboard directly? I'm asking because I might get rid of that interface for wayland security anyway.
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!
Apologies for the late reply. The idea is having a means of taking action automatically on updated clipboard content without polling. As far as I can make out, Klipper actions cannot serve this purpose as they require user interaction for action commands to execute. Being able to define Klipper actions that immediately and without user intervention execute commands when the regex is matched would also provide a solution to avoiding polling. I don't think the X clipboard has a poll-free interface. Moreover, by using Klipper, things will keep on working when moving over to Wayland.
(In reply to David Edmundson from comment #1) > Can you expand on why you're querying klipper for clipboard instead of just > watching the clipboard directly? > > I'm asking because I might get rid of that interface for wayland security > anyway. Hey, I want chime on this. One use case is to sync programs with separate clipboard/kill-rings. For example user I want to sync the kill-ring of Emacs with Klipper. On way is to poll Klipper contiguously for updates however it would be far easier and less time consuming to have a dbus signal whenever the klipboard contents change.
Wip PR that addresses this feature: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2126
Git commit f3830cd8e379ce72f5307e1bef0d071c98d7e979 by Nate Graham, on behalf of Björn Bidar. Committed on 10/04/2023 at 13:54. Pushed by ngraham into branch 'master'. klipper: Expose DBus signal to tell when clipboardHistory was updated The signal can be used to watch for changes on the clipboard for example to wait for the users input on other program or interoperate in any other way. An example use case is if a user want to sync the kill-ring of Emacs or any other Editor with Klipper. FIXED-IN: 6.0 Signed-off-by: Björn Bidar <bjorn.bidar@thaodan.de> M +4 -1 klipper/klipper.cpp M +1 -0 klipper/klipper.h https://invent.kde.org/plasma/plasma-workspace/commit/f3830cd8e379ce72f5307e1bef0d071c98d7e979