@hackage Clipboard2.3.2.2

System clipboard interface.

Clipboard is a library for easily interfacing with the system clipboard with additional unicode support. Currently, only in a Windows or GNU/Linux (X11) system.

For example, if you type:

$ setClipboardString "Hello, World!"

Then you have "Hello, World!" available to be pasted wherever you want.

Now, if you type:

$ modifyClipboardString reverse

You will have "!dlroW ,olleH" in your clipboard. So:

$ getClipboardString
"!dlroW ,olleH"

The X11 version depends on the X11 package, so you will need the X11 development library available on your system at compile time. You can install it with apt install libxrandr-dev (or the equivalent on your system).