# Provider Actions

Walker gives you the freedom to provide multiple actions/keybinds for a list item. These are configured in the `[providers.actions]` section of the config. This section will be merged with the default configuration.

```
[providers.actions]
runner = [
  { action = "run", default = true, bind = "Return" },
  { action = "runterminal", label = "run in terminal", bind = "shift Return" },
]
```

There is a bit of magic behavior going on:

* item has only 1 action and no bind set ⇒ automatic fallback
* default `bind` key ⇒ `Return`
* default `after` key ⇒ `Close`
* default `label` key ⇒ `action` key

### Possible `after` keys and their behavior

|                  |                                  |
| ---------------- | -------------------------------- |
| KeepOpen         | Activate item + select next      |
| Close            | Close                            |
| Nothing          | Nothing                          |
| Reload           | Reload with current query        |
| ClearReload      | Clear query and reload           |
| AsyncClearReload | Reload gets triggered by backend |
| AsyncReload      | Reload gets triggered by backend |

### Special actions

|                      |                              |
| -------------------- | ---------------------------- |
| provider:\<provider> | switches to a given provider |
| set:\<set>           | switches to a given set      |
|                      |                              |

### Fallbacks

Often times, you have multiple providers with the same actions, example: `menus:open` is a common action for custom menus. Instead of having to define this action for every provider, Walker allows you to set fallbacks, f.e.:

```
[providers.actions]
fallback = [
  { action = "menus:open", label = "open", after = "Nothing" },
  { action = "erase_history", label = "clear hist", bind = "ctrl h", after = "AsyncReload" },
]
```

You can define your own fallbacks in a similar fashion.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://benz.gitbook.io/walker/customization/provider-actions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
