An application for manipulating pasteboard.
Create ~/.copyhook.js file like following:
function onCopied() {
console.log(pb.types);
pb.copy(pb.string().replace(/^\s*|\s*$/g, ""));
}
The function onCopied
is called on copied.
Set str
to pasteboard as type "public.utf8-plain-text".
Get string from pasteboard by type "public.utf8-plain-text".
Get string by type
.
Set str
for type
.
Get base64 encoded string by type
Set data by base64 encoded string base64
for type
.
Clear current pasteboard contents. You should call this before setting.
Returnes current pasteboard types.
Print str
to system log.
Load JavaScript file from ~/.copyhook/
.
Returns bundle id of current focused application.
Returns title of focused window.
Execute external program by /bin/sh with supplied stdin
as standard input for its process and returns standard out of executed external program.