Utility Library to Access and Manipulate the Default System Clipboard
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Hammy 7486682b2c Try something different and pray it works 3 years ago
src Add tests for MyClipboard#getSystemClipboard 3 years ago
.gitignore Update .gitignore 3 years ago
Dockerfile Try something different and pray it works 3 years ago
Jenkinsfile Try something different and pray it works 3 years ago
LICENSE Initial commit 3 years ago
README.md Add codecov badge 3 years ago
pom.xml Add dependency for parameterised junit tests 3 years ago

README.md

fossa license maven-central build-status codecov issues pull-requests

MyClipboard

Utility Library to Access and Manipulate the Default System Clipboard

About

The inspiration for this project came from my frustration of macOS not having clipboard history built-in unlike Windows. This library will allow you to access the system clipboard and manipulate it.

Configuration

TODO

Windows / *Unix

This approach differs from the macOS section below as Windows/*Unix properly notify the program with global clipboard events. This allows for a more event-driven approach as lostOwnership() is triggered whenever the clipboard has lost ownership - clipboard has new content within it - and the contents can be observed by multiple consumers.

macOS

Unlike the aforementioned event-driven approach, macOS unfortunately is not very good at notifying the program if the system clipboard has changed. To query the system clipboard contents, we need to employ a polling schedule. I have chosen 200ms to ensure that images and large files can be copied over as well as reducing the load on the CPU.

Contributing

TODO

Installation

Latest Stable Version: maven-central

Be sure to replace the VERSION key below with the one of the versions shown above!

Maven

<!-- https://mvnrepository.com/artifact/me.goudham/MyClipboard -->
<dependency>
    <groupId>me.goudham</groupId>
    <artifactId>MyClipboard</artifactId>
    <version>VERSION</version>
</dependency>

Gradle

repositories {
    mavenCentral()
}

dependencies {
    // https://mvnrepository.com/artifact/me.goudham/MyClipboard
    implementation group: 'me.goudham', name: 'MyClipboard', version: 'VERSION'
}

License

FOSSA Status