Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asvvvad1/vlipboard
An extension to the V clipboard library with additional support
https://github.com/asvvvad1/vlipboard
clipboard clipboard-library clipborad plan9 termux v wayland wl-clipboard
Last synced: 2 months ago
JSON representation
An extension to the V clipboard library with additional support
- Host: GitHub
- URL: https://github.com/asvvvad1/vlipboard
- Owner: asvvvad1
- License: mit
- Created: 2020-05-16T06:49:05.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-25T22:48:25.000Z (over 4 years ago)
- Last Synced: 2024-05-19T05:28:17.052Z (8 months ago)
- Topics: clipboard, clipboard-library, clipborad, plan9, termux, v, wayland, wl-clipboard
- Language: V
- Homepage:
- Size: 8.79 KB
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-v - vlipboard - An easy to use wrapper of clipboard with Wayland and Termux support. (Libraries / Operating system)
README
# vlipboard
An extended clipboard library for V with Wayland, Termux, Plan 9 and xclip & xclip fallback support.
It's meant to be easier to use and simple. Contributions welcome!## Requirements:
- Wayland support needs [wl-clipboard](https://github.com/bugaevc/wl-clipboard) to be in $PATH
- Termux support only needs the Addons:API package to be installed
- There is no direct way to build V programs for Plan 9 but you can compile to C code then build it on your Plan 9 machine. see https://github.com/vlang/v/issues/4979>Written a V port of wl-clipboard or want to do so? have an idea on other platforms support? You're welcome to open an issue or a pull request! This is my first V module and I just started out learning so any help is welcome ^^
# Usage:
```v
import asvvvad.vlipboardfn main() {
mut clip := vlipboard.new() or {
panic(err)
}text := 'Hello, world!'
clip.copy(text) // copy() returns true on success
println(clip.paste()) // 'Hello, world!'
clip.clear() // clear() returns true on success
println(clip.paste().len <= 0) // true
}
```
That's it! :3