Documentation‎ > ‎Commands‎ > ‎


Manipulate the clipboard.


gnocl::clipboard [subcommand] [-option value...]


With the clipboard command the clipboard can be manipulated. XWindow has different clipboards. As default gnocl uses CLIPBOARD, which is the clipboard used by GTK and Gnome programs for copy, paste and cut operations. PRIMARY is the clipboard which contains the currently selected text. It can be selected by setting the -primary option to 1.


hasText [-primary boolean]
Returns a boolean whether the clipboard contains text.
setText [text] [-primary boolean]
Sets the content of the clipboard to text.
getText [-primary boolean]
Returns the content of the clipboard if it contains text. Otherwise returns the empty string.
clear [-primary boolean]
Clears the clipboard.