(Experimental) Go library for multi-platform clipboard.

clipboard

Actions Status Doc Go Report Card

This is a multi-platform clipboard library in Go.

Abstract

  • This is clipboard library in Go, which runs on multiple platforms.
  • External clipboard package is not required.

Supported Platforms

  • Windows (Pure Go)
  • macOS (required cgo)

⚠ WIP ⚠

  • Linux, Unix (X11)

Unfortunately, I don't think it's feasible for Linux to build clipboard library, because xclient needs to be referenced as a daemon in order to keep the clipboard data. This approach is the same for xclip and xsel.

Go has an approach to running its own programs as external processes, such as VividCortex/godaemon and sevlyar/go-daemon. But these cannot be incorporated as a library, of course. xclip and xsel can also be achieved because they are completed as binaries, not libraries.

So it turns out that it is not possible to achieve clipboard in Linux as a library.

Installation

go get github.com/d-tsuji/clipboard

API

package clipboard

// Get returns the current text data of the clipboard.
func Get() (string, error)

// Set sets the current text data of the clipboard.
func Set(text string) error
Similar Resources

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration

Karmada Karmada: Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration Karmada (Kubernetes Armada) is a Kubernetes management system that enables

Dec 30, 2022

Multi producer and multi-reader lockless ring buffer in go using generics from the go 1.18beta release

LocklessGenericRingBuffer This is an implementation of a multi producer, multi r

Dec 25, 2022

Go WhatsApp Multi-Device Implementation in REST API with Multi-Session/Account Support

Go WhatsApp Multi-Device Implementation in REST API This repository contains example of implementation go.mau.fi/whatsmeow package with Multi-Session/

Dec 3, 2022

Most comprehensive list :clipboard: of tech interview questions :blue_book: of companies scraped from Geeksforgeeks, CareerCup and Glassdoor.

Most comprehensive list :clipboard: of tech interview questions :blue_book: of companies scraped from Geeksforgeeks, CareerCup and Glassdoor.

Companies* Companies E Expedia G Grab M MobiKwik N NEC Technologies P PayPal S Samsung Research Institute U Uber Y Yatra.com Z Zomato Announcements πŸ‘

Dec 29, 2022

A clipboard-based mocking framework for Go that gets out of your way.

A clipboard-based mocking framework for Go that gets out of your way.

A clipboard-based mocking framework for Go that gets out of your way. This tool has been built with inspiration lovingly taken from Moq, and fuelled b

Nov 18, 2022

Use AWS SQS as a clipboard to copy and paste across different systems and platforms

sqs_clipboard Use AWS SQS as a clipboard to copy and paste across different systems and platforms. Clipboard contents are encrypted in transit and at

Oct 16, 2022

A simple way to share files and clipboard within a local network.

Shortcut Simple way to share files and clipboard with devices within a local network. Usage Run the ./shortcut executable. A browser window will be op

Mar 13, 2022

simple clipboard copy for complex outputs

simple clipboard copy for complex outputs

Terminal Clipboard Different from others terminal's clipboard coppiers, this one can copy complex and interminables commands like tail -f or outputs t

Nov 5, 2021

With Pasteback you can store common terms and paste them back to clipboard

Pasteback With Pasteback you can store common terms and paste them back to clipboard when needed. There is one central spot to put every string into y

Nov 22, 2021

Command line interface to windows clipboard over KiTTY remote-control printing

kclip Command line interface to windows clipboard over KiTTY remote-control printing About This tool behaves like the cat command, it just tries to pa

Dec 12, 2021

A password manager as a CLI, where you can use a master password to retrieve a specified password and store it in your clipboard

A password manager as a CLI, where you can use a master password to retrieve a specified password and store it in your clipboard

Password manager Description CLI to store and retrieve passwords. The retrieved password will be stored on your clipboard! Usage 1.Start with Go go ru

Dec 16, 2021

Quality of life tool for diablo2r. Automatically counts up and writes the game name into clipboard.

Quality of life tool for diablo2r. Automatically counts up and writes the game name into clipboard.

counterbaal Quality of life tool for people hosting diablo2 baalruns. Automatically counts up and writes the game name into clipboard. Probably only u

Jan 1, 2022

Clipsync: a high performance clipboard sharing application for linux

clipsync: Clipboard sync Clipsync is a high performance clipboard sharing applic

Sep 18, 2022

Clip - A simple and robust clipboard manager

clip A simple and robust clipboard manager Clip is currently ONLY for macos and

Jun 20, 2022

Proof-of-concept Windows-like clipboard manager for Linux in Go

Goclip Simple Windows-like clipboard manager for linux. This application is just a proof-of-concept and might be highly unstable. Features Clipboard t

Jan 28, 2022

Insert German umlauts in the clipboard text.

Trying to write German on an English keyboard proves to be hard. Entering umlauts like À and ß is not easy. This program will insert umlauts in your c

Feb 7, 2022

Golang terminal ANSI OSC52 wrapper. Copy text to clipboard from anywhere.

go-osc52 A terminal Go library to copy text to clipboard from anywhere. It does so using ANSI OSC52. The Copy() function defaults to copying text from

Dec 6, 2022

Fast, multi-platform web server with automatic HTTPS

Fast, multi-platform web server with automatic HTTPS

a project Every site on HTTPS Caddy is an extensible server platform that uses TLS by default. Releases Β· Documentation Β· Get Help Menu Features Insta

Jan 1, 2023

Enterprise-grade container platform tailored for multicloud and multi-cluster management

Enterprise-grade container platform tailored for multicloud and multi-cluster management

KubeSphere Container Platform What is KubeSphere English | δΈ­ζ–‡ KubeSphere is a distributed operating system providing cloud native stack with Kubernete

Jan 2, 2023
Comments
  • fix: Daemonization for X client

    fix: Daemonization for X client

    The Xclient needs to be daemonized in order to persistently use the values set in the clipboard. This is a similar technique used in other clipboard applications such as xsel and xclip.

    The daemon exits when it gets a SelectionClear event, i.e. when Xclient loses ownership of the selection. https://tronche.com/gui/x/xlib/events/client-communication/selection-clear.html

πŸ”₯ Continuous profiling platform β€” debug performance issues in your code!
πŸ”₯  Continuous profiling platform β€” debug performance issues in your code!

Pyroscope is an open source continuous profiling platform.

Jan 7, 2023
Camerdevs, is dev cameroonian developer platform.

camerdevs Camerdevs, is dev cameroonian developer platform. Features The platform includes the functionnalities bellow: A Catalogue cameroonian develo

Oct 23, 2022
golang feature toggle library - a library to help make golang feature toggling clean and easy

toggle supports env_variable backed toggling. It can also be updated via a pubsub interface (tested w/ redis) 2 engines for toggle backing are include

Mar 29, 2022
Martian is a library for building custom HTTP/S proxies

Martian Proxy Martian Proxy is a programmable HTTP proxy designed to be used for testing. Martian is a great tool to use if you want to: Verify that a

Dec 31, 2022
Aegis is a library that allows you detect if your software is being debugged or not on Linux, FreeBSD, NetBSD, OpenBSD and Windows
Aegis is a library that allows you detect if your software is being debugged or not on Linux, FreeBSD, NetBSD, OpenBSD and Windows

Aegis is a library that allows you detect if your software is being debugged or not on Linux, FreeBSD, NetBSD, OpenBSD and Windows. You can use it natively from C or use the Go bind.

Aug 29, 2022
An experimental Go application that allows an SSH session to interact with the clipboard of the host machine and forward calls to open

Remote Development Manager An experimental Go application that allows an SSH session to interact with the clipboard of the host machine and forward ca

Dec 27, 2022
Cross platform local network clipboard sync.

clipSync Synchronize clipboard content across multiple devices. Features Rapidly synchronize clipboard content to all devices in same local network. S

Jan 3, 2022
πŸ“‹ cross-platform clipboard package that supports accessing text and image in Go (macOS/Linux/Windows/Android/iOS)

clipboard Cross platform (macOS/Linux/Windows/Android/iOS) clipboard package in Go import "golang.design/x/clipboard" Features Cross platform supports

Dec 24, 2022
An experimental Go cross platform UI library.

GXUI - A Go cross platform UI library. Notice: Unfortunately due to a shortage of hours in a day, GXUI is no longer maintained. If you're looking for

Jan 6, 2023
A fast data generator that's multi-table aware and supports multi-row DML.
A fast data generator that's multi-table aware and supports multi-row DML.

If you need to generate a lot of random data for your database tables but don't want to spend hours configuring a custom tool for the job, then datage

Dec 26, 2022