Beware This package only works with Atom >=v1.19
An Atom package that allows you to assign custom actions to Touch Bar components.
- Go to File → Settings → Packages
- Find touch-bar-utility and click on the card but not on the name of the package
- Go to Settings and edit the Buttons entry with a JSON array of Touch Bar components
- A component has the following format: {"type": "<typeOfElement>"[, ...]}
Name of variable | Type of variable | Optional | Description |
---|---|---|---|
label | String | Yes | Button text. |
backgroundColor | String | Yes | Button background color in hex format, i.e #ABCDEF. |
pathOfIcon | String | Yes | Path to button icon. |
iconPosition | String | No | Can be left, right or overlay. |
click | Function | Yes | Function to call when the button is clicked. |
clickDispatchAction | String | Yes | Event from another package that you want to execute when button is clicked. It will override the click property. It must be in the following format: "<package-name>:<event-name>" without quotation marks. |
dispatchActionTarget | String | Yes | Can have a value of 'workspace' or 'editor'. It defaults to 'workspace'. |
Name of variable | Type of variable | Optional | Description | Return values | Return values type | Return values description |
---|---|---|---|---|---|---|
availableColors | String[] | Yes | Array of hex color strings to appear as possible colors to select. | |||
selectedColor | String | Yes | The selected hex color in the picker, i.e #ABCDEF. | |||
change | Function | Yes | Function to call when a color is selected. | color | String | The color that the user selected from the picker |
Name of variable | Type of variable | Optional | Description |
---|---|---|---|
items | Array of elements | No | Items to display as a group. |
Name of variable | Type of variable | Optional | Description |
---|---|---|---|
label | String | Yes | Text to display. |
textColor | String | Yes | Hex color of text, i.e #ABCDEF. |
Name of variable | Type of variable | Optional | Description |
---|---|---|---|
label | String | Yes | Popover button text. |
pathOfIcon | String | Yes | Popover button icon. |
items | Array of elements | Yes | Items to display in the popover. |
showCloseButton | Boolean | Yes | true to display a close button on the left of the popover, false to not show it. Default is true. |
Name of variable | Type of variable | Optional | Description | Return values | Return values type | Return values description |
---|---|---|---|---|---|---|
label | String | Yes | Label text. | |||
value | Integer | Yes | Selected value. | |||
minValue | Integer | Yes | Minimum value. | |||
maxValue | Integer | Yes | Maximum value. | |||
change | Function | Yes | Function to call when the slider is changed. | newValue | Number | The value that the user selected on the Slider |
Name of variable | Type of variable | Optional | Description | Options | Options description |
---|---|---|---|---|---|
size | String | Yes | Size of spacer, possible values are: | small | Small space between items. |
large | Large space between items. | ||||
flexible | Take up all available space. |