Sets the system clipboard text.
Usage #
package main
import (
t "github.com/hugmouse/gotermux"
)
func main() {
clipboard := t.TClipboard{
Text: "Hello from GoTermux!",
}
t.TermuxClipboardSet(clipboard)
}
Parameters #
clip TClipboard
- Clipboard data structure
Struct TClipboard #
Field | Type | Description |
---|---|---|
Text | string | Text to set in the clipboard |
If the text field is empty, the function will log “Clipboard is empty!” and do nothing.