launchbar-node v2.2.3
launchbar-node
A helper library for making LaunchBar actions.
Note: A heavy work in progress, things change and break incessantly.
Features
- Aims to offer NodeJS bindings for the entire LaunchBar JavaScript API.
- Tries to be as syntactically similar as reasonably possible to LaunchBar's own JS API.
- Easy caching.
- Easy action config handling.
Table of Contents
- hide
- remainActive
- hasKeyboardFocus
- setClipboardString
- clearClipboard
- paste
- performService
- displayNotification
- textAction
hide
hides LaunchBar.
remainActive
keeps LaunchBar active.
hasKeyboardFocus
Returns boolean true if LaunchBar has keyboard focus, otherwise false.
setClipboardString
sets the clipboard's contents.
Parameters
textString the text to copy to the clipboard.
clearClipboard
Clears the clipboard's contents.
paste
Paste text in the frontmost application.
Parameters
textnull-nullString text the text to paste.
performService
Perform a macOS service (as seen System Preferences > Keyboard > Shortcuts).
Parameters
displayNotification
Displays a message in Notification Center.
Parameters
optionsObject?options.textstring? the notification's body.options.titlestring? the notification's title.options.subtitlestring? the notification's subtitle.options.callbackUrlstring? URL opened if the user clicks on the notification.options.afterDelaynumber? Delay in seconds before the notification is shown.
textAction
Boilerplate function for text-processing actions.
Parameters
textArgumentstextProcessingFunctionfunction a function to run over each line. Should accept and return single argument -- a line of text.joinerstring the separator to join back the lines into a string. (optional, default"\n")text(String | Array) a single string or an array of strings.
To Do
- Loud error handling with output directly LaunchBar.
- Tests.
- Documentation.
Credits
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago