# Starting Caja-Actions Configuration Tool

You can start Caja-Actions Configuration Tool in the following ways:

System menu

- Choose Preferences Look and Feel Caja-Actions Configuration Tool.

Befehlszeile

- To start Caja-Actions Configuration Tool from a command line, type the following command:

  ``caja-actions-config-tool``

  then press Return.

  To view available command line options, type:

  ``caja-actions-config-tool` `--help-all``

  then press Return.

## The first run

When you start Caja-Actions Configuration Tool, the following window is displayed.

### Caja-Actions Configuration Tool Start Up Window

Shows Caja-Actions Configuration Tool main window. Contains menubar, toolbar, display area, an empty items list in the left, several disabled properties tabs, and statusbar.

The Caja-Actions Configuration Tool main window contains the following elements:

Menubar.

- The menus on the menubar contain all of the commands you need to use in Caja-Actions Configuration Tool.

  Shortcuts are available for some commands:

  Strg N

- Create a new action.

Strg S

- Save modified actions and menus.

Strg Q

- Quit the application.

Strg X

- Cut the current selection, keeping it in the clipboard.

Strg C

- Copy the current selection to the clipboard.

Strg V

- Insert the content of the clipboard before the current item.

Umschalt Strg V

- Insert the content of the clipboard as subitem(s) of the current item.

Entfernen

- Delete the current selection.

F5

- Reload the actions and menus.

F1

- Display the help.

Toolbar.

- Several toolbars may be displayed below the menubar, depending of your choices in the View Toolbars submenu.

Items list.

- The list on the left of the main window contains all items, whether they are actions or menus, currently available for edition in Caja-Actions Configuration Tool.

  Items may be sorted in ascending or descending alphabetical order, or not sorted at all, being directly organized and managed by the user.

  Invalid items are displayed in red color.

  Modified items are displayed in italic characters.

Sort buttons

- Three buttons allow you to toggle between sort modes.

Properties tabs.

- The right part of the main window displays all is needed to define how, when and where actions and menus should be displayed.

  Action/Menu

- Define in which Caja menus the item should appear, and how it will be displayed.

Befehl

- Specify which command to execute, and which parameters pass to it.

Execution

- Specify how the command should be executed.

Basenames

- Define the basename filters the Caja selection must satisfy in order the action or menu be candidate for display.

Mimetypes

- Define the mimetype filters the Caja selection must satisfy in order the action or menu be candidate for display.

Ordner

- Define the folder filters the Caja selection must satisfy in order the action or menu be candidate for display.

Schemes

- Define the scheme filters the Caja selection must satisfy in order the action or menu be candidate for display.

Capabilities

- Define the capability filters the Caja selection must satisfy in order the action or menu be candidate for display.

Environment

- Define some environment conditions the Caja selection must satisfy in order the action or menu be candidate for display.

Eigenschaften

- Display item properties.

Statusbar.

- The statusbar displays some status informations about the currently selected row in the items list.

  When no relevant information is to be displayed, the statusbar displays the count of loaded menus, actions and profiles.

  The « read-only » icon is displayed in the right of the statusbar when appropriate.

## Creating your first action

In this example, we are going to create an action which displays some pretty informations about the current selection.

## Checking for prerequisites

This action will require MateDialog.

MateDialog is a program which will allow you to create a graphical user interface from a command-line.

You should check that this program is installed on your system, by example by typing the following command in a terminal:

``matedialog``

then press Return.

## Creating the action

To create a new action, choose Ctrl N File New action.

A new action is inserted in the items list, and its properties are displayed in the tabs on the right pane.

The label of the currently edited action (this one) is added to the application name in the title bar.

### Default properties of a new action

Shows the default properties of a newly created action.

In the Items list, the new action is displayed in italic characters.

Italics are used as a reminder that the item has not yet been saved.

As another reminder that there is some pending modifications, an asterisk (« `*` ») comes to prefix the application name in the title bar.

## Qualifying your new action

It merely consists of choosing how your action will be displayed in the file manager context menu.

- Enter `My first action` in the Context label entry box.

  The Context label entry box contains the label of the action as you want it to be displayed in the file manager context menu.

  The label is a mandatory property of your action. If it happens to be empty, then your action will be considered as invalid by Caja-Actions: it will be displayed in red in Items list and will never be candidate to be displayed in the file manager context menus.

- Enter `This will execute an action with some parameters` in the Tooltip entry box.

  The Tooltip entry box contains the text you want to be displayed as a short help to your action.

- Select in the Icon drop-down list.

  The Icon selection defines the icon which will be associated with your action in file manager context menus and in the toolbar.

  You have two ways of choosing the icon associated to your action:

  - Click on the Icon drop-down list to select an icon.

  - Click on Browse to search for an image in the filesystem.

## Specifying the command to be executed

When you will select your action in the file manager context menu, this command will be executed, with arguments of your choice.

Click on the Command tab to show the page which will permit you to enter the command.

### Command page

Shows the Command tab. This tab contains the name of the profile, the command to be executed along with its parameters, and the configuration of the starting working directory.

- Enter `matedialog` in the Path entry box.

  The Path entry box defines the command which will be executed when you will select your action in the file manager context menu.

  You have two ways of defining the command to be executed:

  - Enter it in the Path entry box.

  - Click on Browse to select the executable file on the filesystem.

  If the command you enter does not have an absolute path, then it will be searched for in the `PATH` variable at execution time.

- Enter `--info --text='%c selected item(s): %U'` in the Parameters entry box.

  The Parameters contains the arguments which will be passed to your command when it will be executed. These arguments may embed parameters which will be expanded at runtime.

  If both Path and Parameters are empty, then this action will be considered as invalid: it will be displayed in red in Items list and will never be candidate to be displayed in the file manager context menus.

## Saving

To save all pending modifications, choose Ctrl S File Save.

Caja automatically takes into account your new action, and displays it in its context menu.

### Your first action in the Caja context menu

Shows the first action in the Caja context menu.

Cliking of the item in the Caja context menu activates it, and executes the corresponding command.

### The result of the execution of your first action

Shows the result of the execution of your first action. This is MateDialog dialog box, displaying the URI of the selected item.