Project
Function
Sample CLI
gway clip copy
References
['debug', 'gui', 'gui.notify', 'info']
Signature
(value=None, *, notify=True, when=None)
Docstring
Extracts or updates the clipboard contents.
Args:
value (str, optional): The value to copy to clipboard. If None, only reads the clipboard.
notify (bool, optional): Whether to send a GUI notification. Default is True.
when (str | Pattern, optional): If provided, must match clipboard contents.
Acts as a gatekeeper: if there's no match, returns None and skips updating.
Returns:
str | None: The previous clipboard content, or None if `when` did not match.