Ok, this should probably be my last Bunch post for a while. I just wanted to point out a couple of new features.
First, as I mentioned in another post recently, there’s a new syntax which allows you to launch an app when closing a Bunch. Take Dropbox as an example. If you quit Dropbox when starting a context that needs the bandwidth (e.g. podcasting), you probably want to load it again when you’re done. This makes it easy: just use
The double bang is a bit inelegant, but I’d already used
!AppName for quitting an app, whereas with any script commands it means “run when quitting”. So that’s a bit ugly, but I figure it’s a double negative, which kind of makes sense, semantically.
I also added the ability to affect volume and mute settings of input and output devices independently. Now you can use
(audio input mute) or
(audio output volume 65).
(audio volume 50) still works and defaults to the current output device.
Ok, here’s the headline feature: I’ve added a feature that allows you to define multiple sections in a snippet file, and specifically reference them when including in a Bunch.
Bunch allows snippet files, which are just partial Bunches in your Bunch folder with any extension other than
.bunch. So if you have
MySnippet.snippet in your Bunch folder, you can then include its contents in any Bunch using:
Which is handy if you want to avoid repeating common tasks in every Bunch. With this new feature, you can have a single snippet file containing multiple snippets, delineated with lines like this:
Then you can reference an individual section in the include line with a fragment identifier:
If you don’t include the fragment id, it will run all the sections, which opens some possibilities for complex snippet handling. One universal snippet but the ability to run just individual parts of it when needed.
As you were.