Custom Buttons - opencardev/crankshaft GitHub Wiki

Unlike Crankshaft Classic, Crankshaft NG supports custom buttons within it's tiled design.

Creating

Buttons are made by creating a config file in the /boot/crankshaft/ folder, one at a time, for each custom button.

The files must follow a button_1, button_2 naming convention with a maximum of eight buttons available.

You can create the config files yourself or through the Crankshaft Management Tool, within a terminal:

crankshaft buttons create 1

... for example, creates a config file for button 1 with default details, allowing you to then customize the button to your specific needs.

Syntax

Each button file must include three values:

  1. Label (the text to appear on your button)
  2. Command (the command to execute when your button is pressed e.g. /boot/crankshaft/custom/mycommand)
  3. Color code (the color for your button, as an RGB value, default is gray)

The # character is used as a delimeter to separate values.

Example of a custom button file, including a colour:

Label#/path/to/my/command#255,255,255#

Example of a custom button file, without a colour:

Label#/path/to/my/command##

Layout

Layout

  • Button pairs 1 & 2, 3 & 4 and 5 & 6 each share cells
  • If only one button is defined within a cell, that button will expand to fill the whole cell
  • Empty cells are filled with a dummy button to complete the layout

Note: Button 7/8 ar removed with pre14!