clipboard

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2018 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearIfMatch

func ClearIfMatch(match string) error

ClearIfMatch clears the clipboard if its current content's truncated hash equals 'match'

func Copy

func Copy(text string, clearAfter Duration) error

Copy copies the provided text to the system clipboard If clearAfter is given and larger 0, the clipboard is automatically cleared after the duration has passed

Types

type Config

type Config struct {
	ClearAfter Duration `toml:"clearAfter"`
}

func NewDefaultConfig

func NewDefaultConfig() Config

type Duration

type Duration struct {
	time.Duration
}

func (Duration) MarshalText

func (d Duration) MarshalText() ([]byte, error)

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL