4

any scripting language will do, to check when the clipboard (both primary and clipboard) contents change, so that specific actions can be executed.

1 Answer 1

2

You can access the Gtk Clipboard by a gtk script wrapper such as Pygtk for Python. It has functions for waiting for different kinds of clipboard input while keeping the main event loop going. Please see the Pygtk reference or this blogpost for example code.

1
  • I don't think I see anything in that gtkclipboard reference that waits for clipboard contents to change, and the blogpost link is broken. If you think this can be done using gtk, could you provide an example here? (I imagine it would be 3 lines or so)
    – Don Hatch
    Jun 5, 2019 at 11:21

You must log in to answer this question.