If you have a significant number of Bunches, you may want more control over how Bunches appear in the menu.
Start by setting the title displayed in the menu using title frontmatter. You can use emoji in the display title without affecting the alphanumeric sort order.
You can manually control the order of menu items using menu order frontmatter.
Lastly, you can use folders in Finder to create submenus of Bunches. Submenus appear at the end of the list, after any Bunches in the base Bunch Folder.
To add a submenu, create a folder inside of your Bunch Folder (the base folder defined in Preferences) in Finder. Move Bunches you want in the submenu into the new folder. Bunch will automatically create a submenu titled with the name of the subfolder (see below for customizing the title), listing the Bunches it contains.
If you have a file arrangement like this:
Bunch Folder/ Bunch 1.bunch Bunch 2.bunch Subfolder/ Bunch 3.bunch Bunch 4.bunch folder.frontmatter (optional, see Customizing the Submenu Title)
The resulting menu would look like:
A few things to note:
- Folders can only be nested one level deeper than the base folder. Folders inside of subfolders will be ignored.
- Relative paths (for scripts, snippets, other Bunches) used in Bunches within subfolders are still relative to the base folder. If you reference
myscript.shwithout a path, it will be assumed that it’s located in the base Bunch Folder.
- In the base menu, each item gets a numeric shortcut key automatically assigned to it. Items in submenus are not assigned shortcut keys, but you can still assign a custom one using shortcut frontmatter.
- Bunches with the same name can exist in different subfolders. When referring to a Bunch in a subfolder (from another Bunch or via AppleScript/URL handler) you should prefix with the folder name (e.g.
Subfolder/Bunch Name). This can be either the actual folder name, or the display title.
folder.frontmatterfile can also exist in the base Bunch Folder, but doesn’t affect subfolders and all submenu-specific keys are ignored. Other keys it contains will be applied to all Bunches in the root folder.
The following frontmatter keys in
folder.frontmatter only apply to subfolders and will not affect the Bunches they contain:
- To ignore a folder completely, set
--- ignore: true ---
- Use the
titlekey to set display title for the submenu, overriding the name of the folder. This can include emoji. Sort order of submenus is alphanumeric, ignoring emoji.
--- title: 👍🏻The Submenu Title ---
- You can add menu separators before or after the submenu item as well, by setting
--- title: Submenu After Divider menu divider: before ---
All other keys are passed on to the Bunches the folder contains, with the exception of
shortcut (which is ignored entirely).
Folder frontmatter can also be used to apply frontmatter keys to every file it contains. See Applying Frontmatter to Multiple Bunches.