Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Latest commit

 

History

History
307 lines (305 loc) · 43.2 KB

index.md

File metadata and controls

307 lines (305 loc) · 43.2 KB

Hammerspoon


Project Links

Resource Link
Website http://www.hammerspoon.org/
GitHub page https://github.com/Hammerspoon/hammerspoon
Getting Started Guide http://www.hammerspoon.org/go/
Spoon Plugin Documentation https://github.com/Hammerspoon/hammerspoon/blob/master/SPOONS.md
Official Spoon repository http://www.hammerspoon.org/Spoons
IRC channel irc://chat.freenode.net/#hammerspoon
Mailing list https://groups.google.com/forum/#!forum/hammerspoon/
LuaSkin API docs http://www.hammerspoon.org/docs/LuaSkin/

API Documentation

Module Description
cp Core CommandPost functionality.
cp.18n CommandPost's Internationalisation & Localisation Manger.
cp.app This class assists with working with macOS apps. It provides functions for
cp.app.menu Represents an app's menu bar, providing multi-lingual access to find and
cp.app.prefs Provides access to application preferences, typically stored via NSUserDefaults or CFProperties.
cp.apple.commandeditor Functions to control and manage Apple's Command Editor - used in Final Cut Pro,
cp.apple.compressor Represents the Compressor application, providing functions that allow different tasks to be accomplished.
cp.apple.compressor.app The cp.app for Apple's Compressor.
cp.apple.fcpxml This extension adds functions and methods that simplify the creation
cp.apple.fcpxml.compoundClip FCPXML Document Compound Clip Object.
cp.apple.fcpxml.event FCPXML Document Event Object.
cp.apple.fcpxml.gap FCPXML Document Gap Object.
cp.apple.fcpxml.multicamClip FCPXML Document Multicam Clip Object.
cp.apple.fcpxml.multicamResource FCPXML Document Multicam Resource Object.
cp.apple.fcpxml.project FCPXML Document Project Object.
cp.apple.fcpxml.resource FCPXML Document Resource Object.
cp.apple.fcpxml.secondaryStoryline FCPXML Document Secondary Storyline Object.
cp.apple.fcpxml.title FCPXML Document Title Object.
cp.apple.finalcutpro Represents the Final Cut Pro application, providing functions that allow different tasks to be accomplished.
cp.apple.finalcutpro.app The cp.app for Final Cut Pro. Will automatically determine
cp.apple.finalcutpro.browser.AppearanceAndFiltering Clip Appearance & Filtering Menu Popover
cp.apple.finalcutpro.browser.Columns Final Cut Pro Browser List View Columns
cp.apple.finalcutpro.cmd.CommandEditor Command Editor Module.
cp.apple.finalcutpro.content.Clip Represents a clip of media inside FCP.
cp.apple.finalcutpro.export.destinations Provides access to the list of Share Destinations configured for the user.
cp.apple.finalcutpro.export.ExportDialog Export Dialog Module.
cp.apple.finalcutpro.export.GoToPrompt Go To Prompt.
cp.apple.finalcutpro.export.ReplaceAlert Replace Alert
cp.apple.finalcutpro.export.SaveSheet Save Sheet
cp.apple.finalcutpro.import.MediaImport Media Import
cp.apple.finalcutpro.inspector.audio.AudioComponent The Audio Configuration section of the Audio Inspector.
cp.apple.finalcutpro.inspector.audio.AudioConfiguration The Audio Configuration section of the Audio Inspector.
cp.apple.finalcutpro.inspector.audio.AudioInspector Audio Inspector Module.
cp.apple.finalcutpro.inspector.BaseMotionPanel A base class for Inspector panels
cp.apple.finalcutpro.inspector.BasePanel A base class for the different panels in the Inspector.
cp.apple.finalcutpro.inspector.color.ColorBoard Color Board Module.
cp.apple.finalcutpro.inspector.color.ColorBoardAspect Represents a particular aspect of the color board (Color/Saturation/Exposure).
cp.apple.finalcutpro.inspector.color.ColorCurve A ColorCurve Element.
cp.apple.finalcutpro.inspector.color.ColorCurves Color Curves Module.
cp.apple.finalcutpro.inspector.color.ColorInspector Color Inspector Module.
cp.apple.finalcutpro.inspector.color.ColorPuck Color ColorPuck Module.
cp.apple.finalcutpro.inspector.color.ColorWell Represents a single Color Well in the Color Wheels Inspector.
cp.apple.finalcutpro.inspector.color.ColorWheel Represents a single Color Well in the Color Wheels Inspector.
cp.apple.finalcutpro.inspector.color.ColorWheels Color Wheels Module.
cp.apple.finalcutpro.inspector.color.CorrectionsBar The Correction selection/management bar at the top of the ColorInspector
cp.apple.finalcutpro.inspector.color.HueSaturationCurve A HueSaturationCurve Element.
cp.apple.finalcutpro.inspector.color.HueSaturationCurves Color Curves Module.
cp.apple.finalcutpro.inspector.color.ValueIndicator ValueIndicator Module.
cp.apple.finalcutpro.inspector.generator.GeneratorInspector Generator Inspector Module. This appears for both Generators and Titles.
cp.apple.finalcutpro.inspector.info.InfoInspector Video Inspector Module.
cp.apple.finalcutpro.inspector.info.InfoProjectInspector Info Inspector Module when a Project is selected.
cp.apple.finalcutpro.inspector.Inspector Inspector
cp.apple.finalcutpro.inspector.InspectorProperty InspectorProperty contains helper functions for handling common property
cp.apple.finalcutpro.inspector.share.ShareInspector Share Inspector Module.
cp.apple.finalcutpro.inspector.text.TextInspector Text Inspector Module.
cp.apple.finalcutpro.inspector.title.TitleInspector Title Inspector Module.
cp.apple.finalcutpro.inspector.transition.TransitionInspector Transition Inspector Module.
cp.apple.finalcutpro.inspector.video.VideoInspector Video Inspector Module.
cp.apple.finalcutpro.main.BackgroundTasksDialog Represents the Background Tasks warning dialog.
cp.apple.finalcutpro.main.Browser Browser Module.
cp.apple.finalcutpro.main.Browser.BrowserMarkerPopover Browser Marker Popup.
cp.apple.finalcutpro.main.EffectsBrowser Effects Browser Module.
cp.apple.finalcutpro.main.FindAndReplaceTitleText Represents a "Find and Replace Title Text" dialogue box.
cp.apple.finalcutpro.main.FullScreenWindow Full Screen Window Player.
cp.apple.finalcutpro.main.GeneratorsBrowser Generators Browser Module.
cp.apple.finalcutpro.main.KeywordEditor Keyword Editor Module.
cp.apple.finalcutpro.main.KeywordField Keyword Text Field Module.
cp.apple.finalcutpro.main.LibrariesBrowser Libraries Browser Module.
cp.apple.finalcutpro.main.LibrariesFilmstrip Libraries Filmstrip Module.
cp.apple.finalcutpro.main.LibrariesList Libraries List Module.
cp.apple.finalcutpro.main.LibrariesSidebar Libraries Sidebar Browser Module.
cp.apple.finalcutpro.main.MediaBrowser Media Browser Module.
cp.apple.finalcutpro.main.Playhead Playhead Module.
cp.apple.finalcutpro.main.PrimaryToolbar Timeline Toolbar.
cp.apple.finalcutpro.main.PrimaryWindow Primary Window Module.
cp.apple.finalcutpro.main.SecondaryWindow Secondary Window Module.
cp.apple.finalcutpro.main.TranscodeMedia Represents the Transcode Media sheet.
cp.apple.finalcutpro.menu Final Cut Pro Menu Helper Functions.
cp.apple.finalcutpro.plugins Scans an entire system for Final Cut Pro Effects, Generators, Titles & Transitions.
cp.apple.finalcutpro.plugins.guiscan Final Cut Pro GUI Plugin Scanner.
cp.apple.finalcutpro.prefs.EditingPanel Editing Panel Module.
cp.apple.finalcutpro.prefs.GeneralPanel General Panel Module.
cp.apple.finalcutpro.prefs.ImportPanel Import Panel Module.
cp.apple.finalcutpro.prefs.Panel Preferences Panel.
cp.apple.finalcutpro.prefs.PlaybackPanel Playback Panel Module.
cp.apple.finalcutpro.prefs.PreferencesWindow Preferences Window Module.
cp.apple.finalcutpro.strings The cp.strings for I18N lookups related to Final Cut Pro.
cp.apple.finalcutpro.timeline.Appearance Timeline Appearance Module.
cp.apple.finalcutpro.timeline.AudioRole Extends Role
cp.apple.finalcutpro.timeline.AudioSubrole Extends Role
cp.apple.finalcutpro.timeline.CaptionsRole Extends Role
cp.apple.finalcutpro.timeline.CaptionsSubrole Extends Role
cp.apple.finalcutpro.timeline.Contents Timeline Contents Module.
cp.apple.finalcutpro.timeline.Index Timeline Index Module.
cp.apple.finalcutpro.timeline.IndexCaptions Provides access to the 'Captions' section of the Timeline Index
cp.apple.finalcutpro.timeline.IndexClips Extends IndexSection
cp.apple.finalcutpro.timeline.IndexClips.Type The collection of RadioButtons that allow filtering by Video/Audio/Title.
cp.apple.finalcutpro.timeline.IndexMode Timeline Index Mode Radio Group Module.
cp.apple.finalcutpro.timeline.IndexRoles Provides access to the 'Roles' section of the Timeline Index
cp.apple.finalcutpro.timeline.IndexRolesArea Represents the list of Roles in the IndexRoles.
cp.apple.finalcutpro.timeline.IndexRolesList Timeline Index Roles List.
cp.apple.finalcutpro.timeline.IndexSection An abstract base class for sections inside the Index.
cp.apple.finalcutpro.timeline.IndexTags Provides access to the 'Tags' section of the Timeline Index
cp.apple.finalcutpro.timeline.IndexTags.Type The collection of RadioButtons that allow filtering by Video/Audio/Title.
cp.apple.finalcutpro.timeline.Role Extends Row
cp.apple.finalcutpro.timeline.SpeedPopover Extends Timeline
cp.apple.finalcutpro.timeline.Timeline Timeline Module.
cp.apple.finalcutpro.timeline.Toolbar Timeline Toolbar
cp.apple.finalcutpro.timeline.Toolbar.Browser A RadioGroup that contains buttons to show or hide the Effects and Transitions Browsers.
cp.apple.finalcutpro.timeline.Toolbar.Skimming Provides access to mouse/trackpad skimming options.
cp.apple.finalcutpro.timeline.VideoRole Extends Role
cp.apple.finalcutpro.timeline.VideoSubrole Extends Role
cp.apple.finalcutpro.viewer.ControlBar Represents the bottom "control" bar on a Viewer
cp.apple.finalcutpro.viewer.InfoBar Represents the bar of information about the Viewer (format, title, viewing options).
cp.apple.finalcutpro.viewer.Viewer Viewer Module.
cp.apple.motion Represents the Motion application, providing functions that allow different tasks to be accomplished.
cp.apple.motion.app The cp.app for Apple's Motion.
cp.battery Provides access to various properties of the battery. Each of these properties
cp.bench Benchmarking Tool.
cp.blackmagic.resolve The Blackmagic DaVinci Resolve Extension.
cp.blackmagic.resolve.app The cp.app for Blackmagic DaVinci Resolve.
cp.blackmagic.resolve.color.Color Color Module.
cp.blackmagic.resolve.color.Tracker Tracker
cp.blackmagic.resolve.main.PrimaryWindow Primary Window Module.
cp.choices Choices Module.
cp.choices.builder Choices Builder Module.
cp.collect.List Lists are similar tables which can contain nil items without shortening the length.
cp.collect.Queue A "double-ended queue" implementation. This allows pushing and popping
cp.collect.Set An implementation of a logical set, which contains a single unique
cp.commands Commands Module.
cp.commands.command Commands Module.
cp.commands.englishKeyCodes Returns a table of all the English Key Codes.
cp.commands.shortcut Shortcut Commands
cp.commands.shortcut.builder Shortcut Commands Builder Module.
cp.config Manage CommandPost's constants and settings.
cp.config.dockIconClickCallback Callback which triggers when the CommandPost Dock Icon is clicked
cp.config.fileDroppedToDockIconCallback File Dropped to Dock Icon Callback
cp.config.shutdownCallback Shutdown Callback Module.
cp.config.textDroppedToDockIconCallback Text Dropped to Dock Icon Callback
cp.console.history Console History Manager.
cp.deferred This extension makes it simple to defer multiple actions after a delay from the initial execution.
cp.delegator cp.delegator is a middleclass "mix-in" that allows for
cp.dev A set of handy developer tools for CommandPost.
cp.dialog A collection of handy Dialog tools for CommandPost.
cp.disk Provides provides details about disk devices attached to the system.
cp.docs Documentation Tools.
cp.feedback Feedback Form.
cp.highland2 Highland 2 support.
cp.highland2.app The cp.app for Highland 2.
cp.highland2.Document Highland 2 Document Window extension.
cp.highland2.Sidebar Represents the sidebar for a document opened in Highland.
cp.i18n.language Provides the set of ISO 693-1/2/3 language codes and names.
cp.i18n.languageID As per Apple's documentation,
cp.i18n.localeID As per Apple's documentation,
cp.i18n.region Provides the set of ISO 3166-1 region codes and names.
cp.i18n.script Provides the set of ISO 15924 language scripts.
cp.idle This library allows tasks to be queue for execution when the computer has
cp.ids Allows managing values/IDs which can vary between versions.
cp.interpolate Provides a function that will interpolate values into a string.
cp.is A simple class that lets you test if a value is a particular type.
cp.json A collection of handy JSON tools.
cp.just This module provides functions to help with performing tasks which may be
cp.lazy cp.lazy is a middleclass "mix-in" that allows for
cp.localized Helps look up localized names for folders.
cp.pattern Contains pattern matching utility functions.
cp.plist Reads & Writes plist data.
cp.plist.archiver Supports 'defrosting' a table which is made up from an 'NSKeyArchiver' record.
cp.plist.plistParser plistParser (https://codea.io/talk/discussion/1269/code-plist-parser)
cp.plugins This is a simple plugin manager.
cp.plugins.env Provides access to resources in the plugin environment. In generally, this will be files stored in a Complex Plugin's folder.
cp.plugins.plugin CommandPost Plugin.
cp.prop This is a utility library for helping keep track of single-value property states. Each property provides access to a single value. Must be readable, but may be read-only. It works by creating a table which has a get and (optionally) a set function which are called when changing the state.
cp.protect Utility function for protecting a table from being modified.
cp.rx Reactive Extensions for Lua.
cp.rx.AsyncSubject AsyncSubjects are subjects that produce either no values or a single value. If
cp.rx.BehaviorSubject A Subject that tracks its current value. Provides an accessor to retrieve the most
cp.rx.CooperativeScheduler Manages Observables using coroutines and a virtual clock that must be updated
cp.rx.go Defines Statements to make processing of
cp.rx.go.Do A Statement that will execute the provided resolvable values.
cp.rx.go.Do.Then A Statement.Modifier of Do
cp.rx.go.Done A Statement that will complete without sending any values.
cp.rx.go.First Extends: Statement
cp.rx.go.Given A Statement that will execute the provided resolvable values.
cp.rx.go.Given.Then A Statement.Modifier of Given
cp.rx.go.If A Statement that will check if a resolvable matches a predicate, then executes other resolvables.
cp.rx.go.If.Are A [Statement.Modifier] of If that sets the values to match.
cp.rx.go.If.AreNot A Statement.Modifier for If that sets the values to not match.
cp.rx.go.If.Is A Statement.Modifier for If that sets a specific value to match.
cp.rx.go.If.IsNot A Statement.Modifier for If that sets a specific value to not match.
cp.rx.go.If.Matches A Statement.Modifier for If that sets a predicate check values against.
cp.rx.go.If.Then A Statement.Modifier that defines what happens when an If matches.
cp.rx.go.If.Then.Otherwise A Statement.Modifier of If, which should be created via If:Then(...):Otherwise(...).
cp.rx.go.If.Then.Otherwise.Then Each Otherwise can have a subsequent Then which will be executed after the previous one resolves.
cp.rx.go.Last A Statement that will complete after the only the last result resolves.
cp.rx.go.List Extends: Statement
cp.rx.go.List.Sorted A Statement.Modifier that specifies the list should be sorted by its 'natural' order - that is a < b.
cp.rx.go.List.SortedBy A Statement.Modifier that specifies the list should be sorted by the specified function.
cp.rx.go.Require A Statement that will require that the resolvable value matches a predicate,
cp.rx.go.Require.Are Specifies that the Required values Are a specific value.
cp.rx.go.Require.AreNot Specifies that the Required values AreNot a specific value.
cp.rx.go.Require.Is Specifies that the Required value Is a specific value.
cp.rx.go.Require.IsNot Specifies that the Required value IsNot a specific value.
cp.rx.go.Require.Matches Specifies that the Required value Matches a function predicate.
cp.rx.go.Retry Extends: Statement
cp.rx.go.Statement A Statement is defined to enable processing of asynchronous resolvable values such
cp.rx.go.Statement.Definition A Statement is defined before being executable.
cp.rx.go.Statement.Modifier A Statement.Modifier is an extension to a Statement that provides additional configuration details.
cp.rx.go.Statement.Modifier.Definition A Statement.Modifier is defined before being executable.
cp.rx.go.Throw A Statement that will throw the provided message.
cp.rx.go.WaitUntil A Statement that will wait for the first value from a resolveable that matches the predicate.
cp.rx.ImmediateScheduler Schedules Observables by running all operations immediately.
cp.rx.Observable Observables push values to Observers.
cp.rx.Observer Observers are simple objects that receive values from Observables.
cp.rx.Reference A handle representing the link between an Observer and an Observable, as well as any
cp.rx.RelaySubject A Subject that provides new Observers with some or all of the most recently
cp.rx.Subject Subjects function both as an Observer and as an Observable. Subjects inherit all
cp.rx.TimeoutScheduler A scheduler that uses the hs.timer library to schedule events on an event loop.
cp.sourcewatcher Watches folders for specific file extensions and reloads the app if they change.
cp.spec An synchronous/asynchronous test library for Lua.
cp.spec.DefaultHandler Default implementation of Handler, which
cp.spec.Definition A Definition is a superclass for a "runnable" specification.
cp.spec.Error Provides an Error message, which can be thrown via the error function.
cp.spec.expect Provides a way of checking values match expected results. At it's core, it uses assert to make the check.
cp.spec.Handler Subclasses of this can customise how reports are handled.
cp.spec.Message Provides an Message message, which can be thrown via the error function.
cp.spec.Report The results of a test run.
cp.spec.Run An individual run of a test Definition or Specification.
cp.spec.Run.This A token passed to test functions to allow them to indicate if a test run
cp.spec.Scenario A Definition which describes a specific scenario.
cp.spec.Specification A Specification is a list of definitions which
cp.spec.TestCase Wraps cp.test into a subclass of Scenario.
cp.spec.Where Created via Scenario:where(...).
cp.strings Provides strings from (potentially) multiple sources, with support for loading from multiple languages.
cp.strings.source.plist Loads strings from a plist with allowing for a given language variation. Eg:
cp.strings.source.table Loads strings from provided tables, allowing for a given language variation. Eg:
cp.test CommandPost Test Scripts.
cp.text This module provides support for loading, manipulating, and comparing unicode text data.
cp.text.matcher Adapted from 'utf8.lua' (https://github.com/Stepets/utf8.lua)
cp.time.flicks Provides support for measuring time in flicks, a base unit of time useful for
cp.tools A collection of handy miscellaneous tools for Lua development.
cp.ui.Alert Alert UI Module.
cp.ui.axutils Utility functions to support hs._asm.axuielement.
cp.ui.Button The Button type extends Element and includes all its
cp.ui.Cell Represents an AXCell axuielement.
cp.ui.CheckBox Check Box UI Module.
cp.ui.ColorWell UI ColorWell.
cp.ui.Column Represents an AXColumn axuielement.
cp.ui.ComboBox Combo Box Module.
cp.ui.Dialog Represents a Window which has a AXSubrole of AXDialog.
cp.ui.DisclosureTriangle Disclosure Triangle UI Module.
cp.ui.Element A support class for hs._asm.axuielement management.
cp.ui.ElementCache Provides caching for Element subclasses that want to cache children.
cp.ui.Grid Abstract base class for AX elements which form a grid, such as Table2 and Outline.
cp.ui.Group UI Group.
cp.ui.Image Represents an AXImage axuielement value.
cp.ui.List Represents an AXList axuielement value.
cp.ui.Menu UI for AXMenus.
cp.ui.MenuButton Menu Button Module.
cp.ui.notifier Supports long-lived 'AX' notifiers. Configure the application to watch, the
cp.ui.Outline Represents an AXOutline axuielement.
cp.ui.Popover UI Group.
cp.ui.PopUpButton Pop Up Button Module.
cp.ui.PropertyRow Represents a single property row, typically in a Property Inspector.
cp.ui.RadioButton Radio Button Module.
cp.ui.RadioGroup Represents an AXRadioGroup, providing utility methods.
cp.ui.Row Represents an AXRow axuielement.
cp.ui.ScrollArea Scroll Area Module.
cp.ui.ScrollBar Provides access to AXScrollBar axuielement values.
cp.ui.SearchField A TextField with a subrole of AXSearchField.
cp.ui.Sheet Sheet UI Module.
cp.ui.Slider Slider Module.
cp.ui.SplitGroup Split Group UI.
cp.ui.Splitter Represents an AXSplitter.
cp.ui.StaticText Static Text Module.
cp.ui.Table Represents an AXTable in the Apple Accessibility UX API.
cp.ui.TextArea UI Text Area.
cp.ui.TextField Text Field Module.
cp.ui.Toolbar Toolbar Module.
cp.ui.Window A Window UI element.
cp.utf16 A pure-LUA implementation of UTF-16 decoding
cp.utf16.be A pure-LUA implementation of UTF-16 decoding with big-endian ordering.
cp.utf16.le A pure-LUA implementation of UTF-16 decoding with little-endian ordering.
cp.watcher This extension provides support for setting up 'event watchers'.
cp.web.block Block.
cp.web.generate Functions for Generating HTML UI Items
cp.web.html Functions for Generating HTML markup.
cp.web.text Functions for managing text on the web.
cp.web.ui This extension contains functions which simplify the creation of standard UI events
cp.web.xml Functions for Generating XML markup.