
Additional variables ( Optional) Any additional query parameters added to the url string will be passed as key=value replacements to the snippet ?file=SNIPPET%23FRAGMENT fragment ( String, Optional) To load just a section of the snippet ( as defined by # lines), pass the name of the fragment here. Hashes should be percent-encoded as %23, e.g. If the snippet file is in the root of your Bunch folder, you can provide just the filename Multiple files can be called by separating them with a comma, and each file can include a #fragment in its path. Assumes this is a relative path from your Bunch folder unless an absolute path is provided. Parameters file ( String) The path to the snippet file. This URL method can be shortened to snippet/SNIPPET_FILE/FRAGMENT?variables=foobar.įragment ID can also be added to the filename with a hash ( #FRAGMENT) but it should be percent-encoded in the URL as %23, e.g. This allows you to load files containing variables and to use the snippet fragment feature to load just a portion of a snippet.Ī Bunch can also be called as a snippet, and if it contains fragment identifiers, a smaller section of the Bunch can be loaded using the snippet method. You can directly load a snippet and define variables with the snippet method. For example, you could add a button to your Touch Bar using BetterTouchTool to trigger a URL like x-bunch://setPref?configDir=~/Dropbox/Sync/WorkBunches, or create a Keyboard Maestro macro that toggled between two folders. Tip: You can use this URL handler to easily switch between sets of Bunches using external tools. Open 'x-bunch://setPref?configDir=~/Dropbox/Sync/Bunches' Open 'x-bunch://setPref?toggleBunches=1' # Change the Bunch folder

(It’s assumed that you want focus returned after executing a Bunch command, as making Bunch a foreground app is relatively pointless.) If an x-source is provided and no x-success value is present, the x-source (URL, app name, or bundle identifier) will be called upon completion.

Simply prefix x-callback-url in the path, and optionally provide an x-source query parameter. x-callback-urlĪll methods can be called in x-callback-url format, for compatibility. Run bunch -i to interactively build a URL. Tip: The Bunch CLI can generate URLs that run various commands for use in other applications. You can create a whole launch control panel on a Stream Deck with these, for example. To create a hotkey or button that toggles a Bunch. Just create an action that opens a URL and use something like: If you have a cool programmable keypad or a Stream Deck, just imagine the possibilities…

Tip: You can use URLs with apps like BetterTouchTool and Keyboard Maestro to assign Bunch actions to hotkeys, buttons and other triggers. Run a snippet with fragment and variables X-bunch://snippet?file=&fragment=&foo=bar
