docs » cp.config
Manage CommandPost's constants and settings.
- cp.config.dockIconClickCallback
- cp.config.fileDroppedToDockIconCallback
- cp.config.shutdownCallback
- cp.config.textDroppedToDockIconCallback
- Constants - Useful values which cannot be changed
- appName
- appVersion
- assetsPath
- basePath
- bundledPluginsPath
- bundleID
- configPrefix
- developerMode
- iconPath
- languagePath
- menubarIconPath
- pluginPaths
- privacyPolicyURL
- processID
- scriptPath
- sourceExtensions
- sourceWatcher
- userConfigRootPath
- userPluginsPath
- Variables - Configurable values
- automaticScriptReloading
- Functions - API calls offered directly by the extension
- application
- get
- prop
- reset
- set
- unwatch
- watch
- Fields - Variables which can only be accessed from an object returned by a constructor
- frontmost
| Signature | cp.config.appName |
|---|---|
| Type | Constant |
| Description | The name of the Application |
| Signature | cp.config.appVersion |
|---|---|
| Type | Constant |
| Description | Prefix used for Configuration Settings |
| Signature | cp.config.assetsPath |
|---|---|
| Type | Constant |
| Description | Path to where Application Assets are stored |
| Signature | cp.config.basePath |
|---|---|
| Type | Constant |
| Description | Path to where the Extensions & Plugins folders are stored. |
| Signature | cp.config.bundledPluginsPath |
|---|---|
| Type | Constant |
| Description | The path to bundled plugins |
| Signature | cp.config.bundleID |
|---|---|
| Type | Constant |
| Description | Application's Bundle ID |
| Signature | cp.config.configPrefix |
|---|---|
| Type | Constant |
| Description | Prefix used for Configuration Settings |
| Signature | cp.config.developerMode <cp.prop: boolean> |
|---|---|
| Type | Constant |
| Description | When true, the app is in developer mode. |
| Signature | cp.config.iconPath |
|---|---|
| Type | Constant |
| Description | Path to the Application Icon |
| Signature | cp.config.languagePath |
|---|---|
| Type | Constant |
| Description | Path to the Languages Folder |
| Signature | cp.config.menubarIconPath |
|---|---|
| Type | Constant |
| Description | Path to the Menubar Application Icon |
| Signature | cp.config.pluginPaths |
|---|---|
| Type | Constant |
| Description | Table of Plugins Paths. Earlier entries take precedence. |
| Signature | cp.config.privacyPolicyURL |
|---|---|
| Type | Constant |
| Description | URL for Privacy Policy |
| Signature | cp.config.processID |
|---|---|
| Type | Constant |
| Description | Application's Process ID |
| Signature | cp.config.scriptPath |
|---|---|
| Type | Constant |
| Description | Path to where Application Scripts are stored |
| Signature | cp.config.sourceExtensions |
|---|---|
| Type | Constant |
| Description | Extensions for files which will trigger a reload when modified. |
| Signature | cp.config.sourceWatcher |
|---|---|
| Type | Constant |
| Description | A cp.sourcewatcher that will watch for source files and reload CommandPost if any change. |
| Signature | cp.config.userConfigRootPath |
|---|---|
| Type | Constant |
| Description | The path to user configuration folders |
| Signature | cp.config.userPluginsPath |
|---|---|
| Type | Constant |
| Description | The path to user plugins |
| Signature | cp.config.automaticScriptReloading <cp.prop: boolean> |
|---|---|
| Type | Variable |
| Description | Automatic Script Reloading. |
| Signature | cp.config.application() -> hs.application object |
|---|---|
| Type | Function |
| Description | Returns the Application as a hs.application object |
| Parameters |
|
| Returns |
|
| Signature | cp.config.get(key[, defaultValue]) -> string or boolean or number or nil or table or binary data |
|---|---|
| Type | Function |
| Description | Loads a setting |
| Parameters |
|
| Returns |
|
| Signature | cp.config.prop(key[, defaultValue]) -> cp.prop |
|---|---|
| Type | Function |
| Description | Returns a cp.prop instance connected to the value of the specified key. When the value is modified, it will be notified. |
| Parameters |
|
| Returns |
|
| Signature | cp.config.reset() |
|---|---|
| Type | Function |
| Description | Resets all the settings for the Application |
| Parameters |
|
| Returns |
|
| Signature | cp.config.set(key, value) |
|---|---|
| Type | Function |
| Description | Saves a setting with common datatypes |
| Parameters |
|
| Returns |
|
| Notes |
|
| Signature | cp.config.unwatch(id) |
|---|---|
| Type | Function |
| Description | Unregisters the watcher with the specified ID. |
| Parameters |
|
| Returns |
|
| Signature | cp.config.watch(events) -> id |
|---|---|
| Type | Function |
| Description | Watches for config events. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Signature | cp.config.frontmost <cp.prop: boolean; read-only> |
|---|---|
| Type | Field |
| Description | Returns whether or not the Application is frontmost. |