Skip to content

F1bonacc1/glippy

Repository files navigation

Glippy - Clipboard for Go

made-with-Go Maintenance PRs Welcome Go Report GoDoc

Couldn't find a go clipboard package which is both multi-platform and doesn't require additional installations. So this package is a combination of work of wonderful and talented people who created the packages mentioned in credits.

Supported Platforms:

  • OSX
  • Windows
  • Linux, Unix

Quick Start

go get github.com/f1bonacc1/glippy
package main

import (
	"fmt"
	"github.com/f1bonacc1/glippy"
)

func main(){
  // set clipboard text
  glippy.Set("Hello, Glippy")
  
  // get clipboard text
  text, err := glippy.Get()
  if err != nil{
    panic(err)
  }
  fmt.Print(text) // Output: "Hello, Glippy"
}
package main

import (
  "context"
  "fmt"
  "github.com/f1bonacc1/glippy"
)

func main(){
  // create clipboard watch channel
  ch := glippy.Watch(context.Background())
	
  for data := range ch {
    fmt.Println(data)
  }
}

Credits

https://github.com/atotto/clipboard

https://github.com/aarzilli/nucular

https://github.com/jezek/xgb

Releases

No releases published

Packages

No packages published

Languages