config

Manage CommandPost's constants and settings.

Submodules

API Overview

API Documentation

Constants

​appName​

Signature

cp.config.appName -> string

Type

Constant

Description

The name of the Application

​appVersion​

Signature

cp.config.appVersion -> string

Type

Constant

Description

Prefix used for Configuration Settings

​assetsPath​

Signature

cp.config.assetsPath -> string

Type

Constant

Description

Path to where Application Assets are stored

​basePath​

Signature

cp.config.basePath -> string

Type

Constant

Description

Path to where the Extensions & Plugins folders are stored.

​bundledPluginsPath​

Signature

cp.config.bundledPluginsPath -> string

Type

Constant

Description

The path to bundled plugins

​bundleID​

Signature

cp.config.bundleID -> string

Type

Constant

Description

Application's Bundle ID

​cachePath​

Signature

cp.config.cachePath -> string

Type

Constant

Description

The path to the CommandPost Cache folder.

​configPrefix​

Signature

cp.config.configPrefix -> string

Type

Constant

Description

Prefix used for Configuration Settings

​developerMode​

Signature

cp.config.developerMode <cp.prop: boolean>

Type

Constant

Description

When true, the app is in developer mode.

​iconPath​

Signature

cp.config.iconPath -> string

Type

Constant

Description

Path to the Application Icon

​languagePath​

Signature

cp.config.languagePath -> string

Type

Constant

Description

Path to the Languages Folder

Signature

cp.config.menubarIconPath -> string

Type

Constant

Description

Path to the Menubar Application Icon

​pluginPaths​

Signature

cp.config.pluginPaths -> table

Type

Constant

Description

Table of Plugins Paths. Earlier entries take precedence.

​privacyPolicyURL​

Signature

cp.config.privacyPolicyURL -> string

Type

Constant

Description

URL for Privacy Policy

​processID​

Signature

cp.config.processID -> number

Type

Constant

Description

Application's Process ID

​scriptPath​

Signature

cp.config.scriptPath -> string

Type

Constant

Description

Path to where Application Scripts are stored

​sourceExtensions​

Signature

cp.config.sourceExtensions -> table

Type

Constant

Description

Extensions for files which will trigger a reload when modified.

​sourceWatcher​

Signature

cp.config.sourceWatcher -> SourceWatcher

Type

Constant

Description

A cp.sourcewatcher that will watch for source files and reload CommandPost if any change.

​translationURL​

Signature

cp.config.translationURL -> string

Type

Constant

Description

URL for Translations

​userConfigRootPath​

Signature

cp.config.userConfigRootPath -> string

Type

Constant

Description

The path to user configuration folders

​userPluginsPath​

Signature

cp.config.userPluginsPath -> string

Type

Constant

Description

The path to user plugins

Variables

​automaticScriptReloading​

Signature

cp.config.automaticScriptReloading <cp.prop: boolean>

Type

Variable

Description

Automatic Script Reloading.

Functions

​application​

Signature

cp.config.application() -> hs.application object

Type

Function

Description

Returns the Application as a hs.application object

Parameters

​

Returns

​

​get​

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

​

​prop​

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

​

​reset​

Signature

cp.config.reset()

Type

Function

Description

Resets all the settings for the Application

Parameters

​

Returns

​

​set​

Signature

cp.config.set(key, value)

Type

Function

Description

Saves a setting with common datatypes

Parameters

​

Returns

​

Notes

​

​unwatch​

Signature

cp.config.unwatch(id)

Type

Function

Description

Unregisters the watcher with the specified ID.

Parameters

​

Returns

​

​watch​

Signature

cp.config.watch(events) -> id

Type

Function

Description

Watches for config events.

Parameters

​

Returns

​

Notes

​

Fields

​frontmost​

Signature

cp.config.frontmost <cp.prop: boolean; read-only>

Type

Field

Description

Returns whether or not the Application is frontmost.