You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/config-files.mdx
+59-40Lines changed: 59 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -286,7 +286,7 @@ Can be one of `'top-left'`, `'top-right'`, `'bottom-left'`, or `'bottom-right'`.
286
286
287
287
If true, the menu will introduce a delay of 100ms before opening on Windows to work around the issue where getting the stylus position is otherwise not possible.
@@ -322,13 +322,13 @@ The duration of the fade-in animation in milliseconds. Set to `0` to disable the
322
322
323
323
The duration of the fade-out animation in milliseconds. Set to `0` to disable the animation. Some actions are only executed after the fade-out animation has finished, so reducing this value can make the menu much "snappier".
This is the last Kando version which was used to write this configuration file.
493
493
Kando will use this to determine whether the configuration file is up-to-date or needs a migration.
@@ -518,6 +518,59 @@ They are JSON objects with the following properties:
518
518
|`conditions`| A dictionary of conditions which must be met for the menu to be shown. [See below for details](#menu-conditions). |
519
519
|`tags`| A list of tags which can be used to filter the menu in the settings dialog. If a menu has no tags, it will only be shown in the all-menus list or if a collection has no tags at all. |
520
520
521
+
##### Menu Item Descriptions
522
+
523
+
The layout of the menu is described by a tree of menu items.
524
+
Each menu item is a JSON object with the following properties:
|`type`| The type of the menu item. Currently, `root`, `submenu`, and `button` are supported. Depending on the type, some other properties. See below for details. |
529
+
|`name`| The name of the menu item. This is shown in the center of the menu when the item is hovered. The name of the root item defines the name of the menu. |
530
+
|`iconTheme`| Either one of the built-in icon themes (`material-symbols-rounded`, `simple-icons`, `simple-icons-colored`, `base64`, or `emoji`) or a subdirectory of the `icon-themes` directory in Kandoβs config directory. [See details](/icon-themes). |
531
+
|`icon`| The name of the icon from the selected icon theme, an emoji like `π` (when `iconTheme` is `emoji`), or a base64-encoded image such as `data:image/gif;base64,...` (when the icon theme is `base64`). [See details](/icon-themes). |
532
+
533
+
###### Type-Specific Properties
534
+
535
+
Depending on the `type` of the menu item, some other properties should be present.
536
+
The following table lists the properties which are valid for each type of menu item.
|`angle`|`button`, `submenu`| Defines the angle of the menu item in degrees. If omitted, the angle is calculated automatically. `0Β°` places the item at the top of the menu, `90Β°` on the right, and so on. Among sibling items, angles must be monotonically increasing. The first angle must be β₯ `0Β°`, and all following angles must be smaller than the first angle + `360Β°`. Invalid angles are ignored. |
541
+
|`children`|`root`, `submenu`| Contains a list of child menu items. Each entry is itself a menu item description. |
542
+
|`openWorkflow`|`submenu`| This workflow will be executed when the submenu is opened. [See below for how to configure a workflow](#workflows--actions). |
543
+
|`activateWorkflow`|`root`, `submenu`| This workflow will be executed when the center of the menu is clicked. [See below for how to configure a workflow](#workflows--actions). |
544
+
|`hoverWorkflow`|`submenu`, `button`| This workflow will be executed when the menu item is hovered. [See below for how to configure a workflow](#workflows--actions). |
545
+
|`selectWorkflow`|`button`| This workflow will be executed when the button item is finally selected. [See below for how to configure a workflow](#workflows--actions). |
546
+
547
+
##### Workflows & Actions
548
+
549
+
As listed above, each menu item can have multiple associated workflows.
550
+
A workflow contains a list of actions which will be executed in order when the workflow is triggered.
|`quickSelectKey`| The key that can be used to trigger the workflow with the keyboard. A single letter like "A", "B", etc. can be used. |
555
+
|`actions`| The list of actions that will be executed when the workflow is triggered. See below for details on the different action types. |
556
+
557
+
Below is a list of all currently supported action types.
558
+
Click on these links to learn more about the individual action types and how they are configured in the JSON format.
559
+
560
+
-[Close Menu](/actions/close-menu): Closes the menu immediately.
561
+
-[Close Submenu](/actions/close-submenu): Closes the currently open submenu and returns to the parent menu.
562
+
-[Delay](/actions/delay): Waits for a given amount of time before executing the next action.
563
+
-[Execute Command](/actions/execute-command): Executes a command in the system shell.
564
+
-[Execute Macro](/actions/execute-macro): Performs a series of key presses.
565
+
-[Focus Window](/actions/focus-window): Focuses a window with a given title.
566
+
-[Inhibit Shortcuts](/actions/inhibit-shortcuts): Temporarily disables all global Kando shortcuts.
567
+
-[Open File](/actions/open-file): Opens a file or directory with the default application.
568
+
-[Open Menu](/actions/open-menu): Switches to another menu.
569
+
-[Open Settings](/actions/open-settings): Opens the Kando settings window.
570
+
-[Open URI](/actions/open-uri): Opens a URI in the default application.
571
+
-[Set Clipboard](/actions/set-clipboard): Sets the system clipboard to a given text.
572
+
-[Simulate Hotkey](/actions/simulate-hotkey): Simulates a key press of a given hotkey.
573
+
521
574
##### Menu Conditions
522
575
523
576
The `conditions` property of a menu description can contain a dictionary of conditions.
@@ -531,40 +584,6 @@ The following properties can be used as **menu conditions**:
531
584
|`windowName`| The name of the window which must be focused for the menu to be shown. It is interpreted in the same way as `appName`. |
532
585
|`screenArea`| A dictionary with the optional properties `xMin`, `xMax`, `yMin`, and `yMax`. The menu will only be shown if the mouse cursor is within the given screen area. Values are given in pixels and are relative to the top-left corner of the screen. If a value is not specified, the area is unbounded in that direction. |
533
586
534
-
##### Menu Item Descriptions
535
-
536
-
The layout of the menu is described by a tree of menu items.
537
-
Each menu item is a JSON object with the following properties:
|`name`| The name of the menu item. This is shown in the center of the menu when the item is hovered. The name of the root item defines the name of the menu. |
542
-
|`iconTheme`| Either one of the built-in icon themes (`material-symbols-rounded`, `simple-icons`, `simple-icons-colored`, `base64`, or `emoji`) or a subdirectory of the `icon-themes` directory in Kandoβs config directory. [See details](/icon-themes). |
543
-
|`icon`| The name of the icon from the selected icon theme, an emoji like `π` (when `iconTheme` is `emoji`), or a base64-encoded image such as `data:image/gif;base64,...` (when the icon theme is `base64`). [See details](/icon-themes). |
544
-
|`quickSelectKey` <Badgetext="new!"variant="tip" /> | The key that can be used to quickly select this menu item. A single letter like "A", "B", etc. can be used. |
545
-
|`angle` (_optional_) | Defines the angle of the menu item in degrees. If omitted, the angle is calculated automatically. `0Β°` places the item at the top of the menu, `90Β°` on the right, and so on. Among sibling items, angles must be monotonically increasing. The first angle must be β₯ `0Β°`, and all following angles must be smaller than the first angle + `360Β°`. Invalid angles are ignored. |
546
-
|`type`| The type of the menu item. Several types are available. [See details](#menu-item-types). |
547
-
|`data`| Depending on the item type, this may contain additional data or be required. [See details](#menu-item-types). |
548
-
|`children`| If the menu item is a submenu, this contains a list of child menu items. Each entry is itself a menu item description. |
549
-
550
-
##### Menu Item Types
551
-
552
-
For now, the `type` property of a menu item can be one of the following values:
553
-
554
-
-[`"command"`](/item-run-command)
555
-
-[`"file"`](/item-file)
556
-
-[`"hotkey"`](/item-simulate-hotkey)
557
-
-[`"macro"`](/item-execute-macro)
558
-
-[`"redirect"`](/item-redirect)
559
-
-[`"settings"`](/item-settings)
560
-
-[`"submenu"`](/item-submenu)
561
-
-[`"text"`](/item-paste-text)
562
-
-[`"uri"`](/item-open-uri)
563
-
564
-
Click on these links to learn more about the individual item types and which `data` properties they require.
565
-
566
-
Starting with Kando 2.3.0, there is also the `"simple-button"` item type, which is meant to be used with the [IPC Interface](/ipc-interface) and does not require a `data` property.
0 commit comments