hluk / CopyQ

Clipboard manager with advanced features
GNU General Public License v3.0
8.26k stars 430 forks source link

Global paste event #2562

Closed ouziel-slama closed 7 months ago

ouziel-slama commented 7 months ago

I would like to systematically display a dialog box to confirm a paste.

By following the example here https://copyq.readthedocs.io/en/latest/command-examples.html#edit-and-paste, I manage to do it for the ctrl+v but using the edit > paste menu the dialog box is not displayed.

[Command]
Command="
    copyq:
    var text = dialog('paste', str(clipboard()))
    if (text) {
      copy(text)
      copySelection(text)
      paste()
    }"
GlobalShortcut=ctrl+v
Icon=\xf0ea
Name=Edit and Paste

Is this possible in general and with Wayland/Labwc in particular (with xwayland applications)?

Thanks in advance.

hluk commented 7 months ago

AFAIK there is no other way to support the paste operation from CopyQ on Wayland except by adding Wayland Support command to CopyQ and installing+configuring ydotool. See also #27.