Skip to content
inspector71 edited this page Sep 20, 2018 · 13 revisions

Creating Custom Buttons

Custom buttons are only possible on the tile gui - not on the classic interface.

Creating

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

The config files must be are named button_1, button_2, etc. up to a max of 8 buttons.

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

crankshaft buttons 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

The config is a combination of three parts:

  1. Label (the text to appear on your button)

  2. Command (the command should to be executer when your button is pressed e.g. /boot/crankshaft/custom/mycommand)

  3. Color code (the color for your button, as an RGB value - by default gray is assigned if not defined)

    As delimater # is used.

    A config should look like this:

    • Including color setup:
      Label#/path/to/my/command#255,255,255#
    • Without color setup:
      Label#/path/to/my/command##

The Layout

Layout

Notes:

  • Button 1 & 2 are sharing the same cell - like 3 & 4 and 5 & 6.
  • If only one button per cell is defined it will use the whole cell.
  • Button 7 is shared with rpi cam if enbled.
  • Button 8 is shared with debug if enabled.
  • If a cell is empty it will be filled with a dummy to complete the layout.
Clone this wiki locally