rickyrockrat / parcellite

GNU General Public License v3.0
224 stars 29 forks source link

Provide a shortcut to paste primary and secondary clipboard #7

Closed Massimo-B closed 7 years ago

Massimo-B commented 7 years ago

Hi,

can you anything say or do about https://github.com/hexchat/hexchat/issues/1962 ? Is it possible that parcellite would overwrite the paste behaviour of CTRL+v and Shift+Insert to separate secondary and primary paste?

I would like to have CTRL+v pasting the secondary while Shift+Insert should paste the primary. Lot of applications are doing it like this like terminator and Palemoon. But Hexchat and Firefox are different here, so I wonder if this is managed by Gtk.

I'm using Parcellite for many years and got to know from it that here is more than only one clipbard. But I still wonder if the paste management is part of Gtk or the Window Manager itself.

rickyrockrat commented 7 years ago

Parcellite has no control over how the application decides what to do. All it can do, really is to manage the clipboard history. If you want separate primary/secondary clipboards, you need to turn off the sync option in parcellite. Essentially parcellite monitors primary and secondary, and keeps a history of them. If sync is on, it puts the newest item from either clipboard on both of them.

Massimo-B commented 7 years ago

I know, syncing the clipboards would be the only solution as in some applications I have no dedicated primary and secondary paste shortcut. But having synced clipboards makes it impossible for some applications to paste. Those applications (I have seen in Java) have edit fields that mark the content when selected, so they are always overwriting the last clipboard.

Anyway I see, parcellite has not option to change the paste behaviour. I just thought you eventually have an idea how to paste as you are dealing with separate primary and secondary clipboard.

rickyrockrat commented 7 years ago

The application has to respond to the event, and you don't get the event unless your window/widget is in focus. There is no standard way for parcellite to paste in another applications window. This is how X is set up. If you want more details, look into the developer docs.