Keep a history of the clipboard, only for text entries
Originally based on code by VFS, but with many changes and some contributions and inspiration from asmagill.
Download: https://github.com/Hammerspoon/Spoons/raw/master/Spoons/TextClipboardHistory.spoon.zip
| Signature | TextClipboardHistory.deduplicate |
|---|---|
| Type | Variable |
| Description | Whether to remove duplicates from the list, keeping only the latest one. Defaults to |
| Source | Source/TextClipboardHistory.spoon/init.lua line 74 |
| Signature | TextClipboardHistory.frequency |
|---|---|
| Type | Variable |
| Description | Speed in seconds to check for clipboard changes. If you check too frequently, you will degrade performance, if you check sparsely you will loose copies. Defaults to 0.8. |
| Source | Source/TextClipboardHistory.spoon/init.lua line 22 |
| Signature | TextClipboardHistory.hist_size |
|---|---|
| Type | Variable |
| Description | How many items to keep on history. Defaults to 100 |
| Source | Source/TextClipboardHistory.spoon/init.lua line 27 |
| Signature | TextClipboardHistory.honor_ignoredidentifiers |
|---|---|
| Type | Variable |
| Description | If |
| Source | Source/TextClipboardHistory.spoon/init.lua line 32 |
| Signature | TextClipboardHistory.ignoredIdentifiers |
|---|---|
| Type | Variable |
| Description | Types of clipboard entries to ignore, see http://nspasteboard.org. Code from https://github.com/asmagill/hammerspoon-config/blob/master/utils/_menus/newClipper.lua. |
| Notes |
|
| Source | Source/TextClipboardHistory.spoon/init.lua line 47 |
| Signature | TextClipboardHistory.logger |
|---|---|
| Type | Variable |
| Description | Logger object used within the Spoon. Can be accessed to set the default log level for the messages coming from the Spoon. |
| Source | Source/TextClipboardHistory.spoon/init.lua line 42 |
| Signature | TextClipboardHistory.paste_on_select |
|---|---|
| Type | Variable |
| Description | Whether to auto-type the item when selecting it from the menu. Can be toggled on the fly from the chooser. Defaults to |
| Source | Source/TextClipboardHistory.spoon/init.lua line 37 |
| Signature | TextClipboardHistory:bindHotkeys(mapping) |
|---|---|
| Type | Method |
| Description | Binds hotkeys for TextClipboardHistory |
| Parameters |
|
| Returns | |
| Source | Source/TextClipboardHistory.spoon/init.lua line 337 |
| Signature | TextClipboardHistory:checkAndStorePasteboard() |
|---|---|
| Type | Method |
| Description | If the pasteboard has changed, we add the current item to our history and update the counter |
| Parameters |
|
| Returns | |
| Source | Source/TextClipboardHistory.spoon/init.lua line 258 |
| Signature | TextClipboardHistory:clearAll() |
|---|---|
| Type | Method |
| Description | Clears the clipboard and history |
| Parameters |
|
| Returns | |
| Source | Source/TextClipboardHistory.spoon/init.lua line 149 |
| Signature | TextClipboardHistory:clearLastItem() |
|---|---|
| Type | Method |
| Description | Clears the last added to the history |
| Parameters |
|
| Returns | |
| Source | Source/TextClipboardHistory.spoon/init.lua line 162 |
| Signature | TextClipboardHistory:pasteboardToClipboard(item) |
|---|---|
| Type | Method |
| Description | Add the given string to the history |
| Parameters |
|
| Returns |
|
| Source | Source/TextClipboardHistory.spoon/init.lua line 190 |
| Signature | TextClipboardHistory:shouldBeStored() |
|---|---|
| Type | Method |
| Description | Verify whether the pasteboard contents matches one of the values in |
| Parameters |
|
| Returns | |
| Source | Source/TextClipboardHistory.spoon/init.lua line 232 |
| Signature | TextClipboardHistory:showClipboard() |
|---|---|
| Type | Method |
| Description | Display the current clipboard list in a chooser |
| Parameters |
|
| Returns | |
| Source | Source/TextClipboardHistory.spoon/init.lua line 307 |
| Signature | TextClipboardHistory:start() |
|---|---|
| Type | Method |
| Description | Start the clipboard history collector |
| Parameters |
|
| Returns | |
| Source | Source/TextClipboardHistory.spoon/init.lua line 285 |
| Signature | TextClipboardHistory:toggleClipboard() |
|---|---|
| Type | Method |
| Description | Show/hide the clipboard list, depending on its current state |
| Parameters |
|
| Returns | |
| Source | Source/TextClipboardHistory.spoon/init.lua line 323 |
| Signature | TextClipboardHistory:togglePasteOnSelect() |
|---|---|
| Type | Method |
| Description | Toggle the value of |
| Parameters |
|
| Returns | |
| Source | Source/TextClipboardHistory.spoon/init.lua line 114 |