Skip to content
A small cross-platform library for reading and modifying the system clipboard
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
System
tests
.travis.yml
Hclip.cabal
LICENSE
README.md
Setup.hs

README.md

Hclip

Hackage Build Status

A small cross-platform library for reading and modifying the system clipboard.

Hclip works on Windows, Mac OS X and Linux (but see the requirements below!).

Requirements

  • Windows: No additional requirements.
  • Mac OS X: Requires the pbcopy and pbpaste commands, which ship with Mac OS X.
  • Linux: Requires xclip or xsel installed.

Example Usage

λ: :m System.Hclip
λ: setClipboard "Haskell"
λ: getClipboard
"Haskell"
λ: modifyClipboard (reverse . map toUpper)
"LLEKSAH"
λ: :m +Control.Exception
λ: let f = zipWith ($) (cycle [toUpper, toLower])
λ: try (modifyClipboard (reverse . f)) :: IO (Either ClipboardException String)
Right "HaSkElL"
You can’t perform that action at this time.