# plugins.core.touchbar.manager

Touch Bar Manager Plugin.


# Submodules


# API Overview

Constants - Useful values which cannot be changed

  • DEFAULT_GROUP
  • FILE_NAME
  • FOLDER_NAME

Variables - Configurable values

  • maxItems
  • numberOfSubGroups

Functions - API calls offered directly by the extension

  • activeGroup
  • activeSubGroup
  • clear
  • forceGroupChange
  • getAction
  • getActionHandlerID
  • getActionTitle
  • getBankLabel
  • getIcon
  • getLabel
  • gotoSubGroup
  • groupStatus
  • incrementActiveSubGroup
  • init
  • nextSubGroup
  • previousSubGroup
  • start
  • stop
  • toggle
  • touchbar
  • update
  • updateAction
  • updateBankLabel
  • updateIcon
  • updateLabel
  • updateOrder

Fields - Variables which can only be accessed from an object returned by a constructor

  • buttons
  • enabled
  • supported

# API Documentation

# Constants

# DEFAULT_GROUP

Signature plugins.core.touchbar.manager.DEFAULT_GROUP -> string
Type Constant
Description The default group.
Notes None
Source src/plugins/core/touchbar/manager/init.lua line 31

# FILE_NAME

Signature plugins.core.touchbar.manager.FILE_NAME -> string
Type Constant
Description File name of settings file.
Notes None
Source src/plugins/core/touchbar/manager/init.lua line 36

# FOLDER_NAME

Signature plugins.core.touchbar.manager.FOLDER_NAME -> string
Type Constant
Description Folder Name where settings file is contained.
Notes None
Source src/plugins/core/touchbar/manager/init.lua line 41

# Variables

# maxItems

Signature plugins.core.touchbar.manager.maxItems -> number
Type Variable
Description The maximum number of Touch Bar items per group.
Notes None
Source src/plugins/core/touchbar/manager/init.lua line 71

# numberOfSubGroups

Signature plugins.core.touchbar.manager.numberOfSubGroups -> number
Type Variable
Description The number of Sub Groups per Touch Bar Group.
Notes None
Source src/plugins/core/touchbar/manager/init.lua line 76

# Functions

# activeGroup

Signature plugins.core.touchbar.manager.activeGroup() -> string
Type Function
Description Returns the active group.
Parameters
  • None
Returns
  • Returns the active group or manager.defaultGroup as a string.
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 584

# activeSubGroup

Signature plugins.core.touchbar.manager.activeSubGroup() -> string
Type Function
Description Returns the active sub-group.
Parameters
  • None
Returns
  • Returns the active sub group as string
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 603

# clear

Signature plugins.core.touchbar.manager.clear() -> none
Type Function
Description Clears the Touch Bar items.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 131

# forceGroupChange

Signature plugins.core.touchbar.manager.forceGroupChange(combinedGroupAndSubGroupID) -> none
Type Function
Description Loads a specific sub-group.
Parameters
  • combinedGroupAndSubGroupID - The group and subgroup as a single string.
Returns
  • None
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 638

# getAction

Signature plugins.core.touchbar.manager.getAction(button, group) -> string
Type Function
Description Returns a specific Touch Bar Action.
Parameters
  • button - Button ID as string
  • group - Group ID as string
Returns
  • Action as string
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 369

# getActionHandlerID

Signature plugins.core.touchbar.manager.getActionHandlerID(button, group) -> string
Type Function
Description Returns a specific Touch Bar Action Handler ID.
Parameters
  • button - Button ID as string
  • group - Group ID as string
Returns
  • Action as string
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 350

# getActionTitle

Signature plugins.core.touchbar.manager.getActionTitle(button, group) -> string
Type Function
Description Returns a specific Touch Bar Action Title.
Parameters
  • button - Button ID as string
  • group - Group ID as string
Returns
  • Action as string
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 331

# getBankLabel

Signature plugins.core.touchbar.manager.getBankLabel(group) -> string
Type Function
Description Returns a specific Touch Bar Bank Label.
Parameters
  • group - Group ID as string
Returns
  • Label as string
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 407

# getIcon

Signature plugins.core.touchbar.manager.getIcon(button, group) -> string
Type Function
Description Returns a specific Touch Bar Icon.
Parameters
  • button - Button ID as string
  • group - Group ID as string
Returns
  • Icon data as string
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 312

# getLabel

Signature plugins.core.touchbar.manager.getLabel(button, group) -> string
Type Function
Description Returns a specific Touch Bar Label.
Parameters
  • button - Button ID as string
  • group - Group ID as string
Returns
  • Label as string
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 388

# gotoSubGroup

Signature plugins.core.touchbar.manager.gotoSubGroup() -> none
Type Function
Description Loads a specific sub-group.
Parameters
  • id - The ID of the sub-group.
Returns
  • None
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 622

# groupStatus

Signature plugins.core.touchbar.manager.groupStatus(groupID, status) -> none
Type Function
Description Updates a group's visibility status.
Parameters
  • groupID - the group you want to update as a string.
  • status - the status of the group as a boolean.
Returns
  • None
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 845

# incrementActiveSubGroup

Signature plugins.core.touchbar.manager.incrementActiveSubGroup() -> none
Type Function
Description Increments the active sub-group
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 709

# init

Signature plugins.core.touchbar.manager.init(deps) -> self
Type Function
Description Initialises the module.
Parameters
  • None
Returns
  • The module.
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 860

# nextSubGroup

Signature plugins.core.touchbar.manager.nextSubGroup() -> none
Type Function
Description Goes to the next sub-group for the active group.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 667

# previousSubGroup

Signature plugins.core.touchbar.manager.previousSubGroup() -> none
Type Function
Description Goes to the previous sub-group for the active group.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 688

# start

Signature plugins.core.touchbar.manager.start() -> none
Type Function
Description Starts the CommandPost Touch Bar module.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 425

# stop

Signature plugins.core.touchbar.manager.stop() -> none
Type Function
Description Stops the CommandPost Touch Bar module.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 467

# toggle

Signature plugins.core.touchbar.manager.toggle() -> none
Type Function
Description Toggles the CommandPost Touch Bar module.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 485

# touchbar

Signature plugins.core.touchbar.manager.touchbar() -> none
Type Function
Description Returns the hs._asm.undocumented.touchbar object if it exists.
Parameters
  • None
Returns
  • hs._asm.undocumented.touchbar
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 109

# update

Signature plugins.core.touchbar.manager.update() -> none
Type Function
Description Updates the Touch Bar.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 755

# updateAction

Signature plugins.core.touchbar.manager.updateAction(button, group, actionTitle, handlerID, action) -> boolean
Type Function
Description Updates a Touch Bar action.
Parameters
  • button - Button ID as string
  • group - Group ID as string
  • actionTitle - Action Title as string
  • handlerID - Handler ID as string
  • action - Action as table
Returns
  • true if successfully updated, or false if a duplicate entry was found
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 214

# updateBankLabel

Signature plugins.core.touchbar.manager.updateBankLabel(group, label) -> none
Type Function
Description Updates a Touch Bar Bank Label.
Parameters
  • group - Group ID as string
  • label - Label as string
Returns
  • None
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 290

# updateIcon

Signature plugins.core.touchbar.manager.updateIcon(button, group, icon) -> none
Type Function
Description Updates a Touch Bar icon.
Parameters
  • button - Button ID as string
  • group - Group ID as string
  • icon - Icon Data as string
Returns
  • None
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 186

# updateLabel

Signature plugins.core.touchbar.manager.updateLabel(button, group, label) -> none
Type Function
Description Updates a Touch Bar label.
Parameters
  • button - Button ID as string
  • group - Group ID as string
  • label - Label as string
Returns
  • None
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 262

# updateOrder

Signature plugins.core.touchbar.manager.updateOrder(direction, button, group) -> none
Type Function
Description Shifts a Touch Bar button either up or down.
Parameters
  • direction - Either "up" or "down"
  • button - Button ID as string
  • group - Group ID as string
Returns
  • None
Notes None
Examples None
Source src/plugins/core/touchbar/manager/init.lua line 145

# Fields

# buttons

Signature plugins.core.touchbar.manager.buttons <cp.prop: table>
Type Field
Description Contains all the saved Touch Bar Buttons
Notes None
Source src/plugins/core/touchbar/manager/init.lua line 92

# enabled

Signature plugins.core.touchbar.manager.enabled <cp.prop: boolean>
Type Field
Description Enable or disable Touch Bar Support.
Notes None
Source src/plugins/core/touchbar/manager/init.lua line 81

# supported

Signature plugins.core.touchbar.manager.supported <cp.prop: boolean; read-only>
Type Field
Description Is true if the Touch Bar is supported on this version of macOS.
Notes None
Source src/plugins/core/touchbar/manager/init.lua line 101