Welcome to the lab.

Bipolar: feelings vs. reality

I wrote a couple of weeks ago about being bipolar. I wrote that piece while I was in a manic phase, and I told myself I’d write another one while I was in a depression, just to contrast. If I’m going to share about a binary disorder, it seems important to document it from both sides. The thing is, I went through the depression and was unable to write for the whole week. I queued up a full week of posts while I was manic and just scheduled them to publish over the week I knew I was going to be down. Planning ahead!

Writing about the manic side was easy. It just flowed out of me — kind of unstoppable. Writing about the depressive side is much more difficult. It takes a concerted effort and there’s a whole potential shame spiral involved. Anyone suffering from depression is probably intimately familiar with this.

I always underestimate the depression side of my mood swings. I know what the manic phase will be like. I know how much I’ll get done, how I’ll be full of ideas, how little sleep I’ll get, and how much that will wear me down over the course of it. In my mind the depression will just be a couple of days off, catching up on sleep, getting back to normal. It never is, and I don’t know why I never remember that.

The Podcasts: Week of September 14th

I had a frank discussion about my bipolar disorder with Christina on Overtired this week. We eventually moved on to an in-depth discussion of the benefits of VS Code, which might seem like a strange transition, but you’ll be amazed how effortless we make it seem. Before it was all over, we also got into cable management for nerds and somehow managed to ignore Taylor Swift completely for a week. I’m not complaining, this was more up my alley. I’m also really proud of the Sleep Quality Index episode image — topical and nicely executed. Good work, Brett.

Over on Systematic, I had the pleasure of welcoming Rabbi Eric Linder back. The conversation ranged from leading a congregation during the age of Zoom to home music and his Klezmer band, with some fun talk about Mac and iOS and how they play into both of the aforementioned topics.

Find all the episodes at systematicpod.com and overtiredpod.com, and be sure to subscribe! My ability to keep the shows going is dependent on my ability to secure advertisers, which is in turn dependent on subscriber numbers. Getting yourself counted in my download stats (and maybe checking out the sponsors now and then) is all you have to do to support either or both shows!

Bunch Snippet Fragments

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 !!Dropbox.

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:


%nvUltra Beta
MultiMarkdown Composer
Marked 2


(dnd off)

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.

Bunch and the Stream Deck

If you have a Stream Deck, you probably have some buttons that launch apps. Using Bunch adds a ton of options beyond just launching a single app: you can have a button that toggles entire groups of apps, running commands and scripts, changing your wallpaper, hiding your Dock… you know, all the things Bunch can do.

The core of the trick is Bunch’s URL handler. You can use x-bunch://toggle (or just x-bunch://open if you don’t want to be able to quit the Bunch). Just add your Bunch name to the end of the url, replacing any spaces with %20, and you have a URL with which you can toggle any Bunch. For example, to toggle my Marked Screencast Bunch, I would just use x-bunch://toggle/Marked%20Screencast.

I discovered after further exploration that the default “Open Website” action for the Stream Deck does in fact work with URL handlers, there’s just a delay in it actually launching. But if you want to skip Keyboard Maestro, you can simply put x-bunch://toggle/BUNCH%20NAME into a System->Website button’s URL.

So the biggest hurdle is just making a button trigger a URL. The default web launch commands don’t seem to do the trick with system url handlers. The best solution I’ve found is to use Keyboard Maestro, and since I already owned it, I didn’t look much further. I’m certain there’s an existing plugin for Stream Deck that would handle this directly, but I didn’t find it yet.

In Keyboard Maestro you’ll set up a macro for each Bunch URL. The macro contains a single action: Open URL, with the x-bunch URL and a target of “Default Application.”

Assigning the macro to a key can be done in two ways. There’s a default Keyboard Maestro plugin available from the “More Actions” menu in the Stream Deck configuration app. That plugin allows you to assign a custom USB Device Key to each button, which you can then apply to the trigger in Keyboard Maestro. Just set up the button, then go to Keyboard Maestro, add a USB Device Key trigger, and then click the button you created on the Stream Deck.

The second way is actually nicer, in my opinion, but I discovered it after I’d already set up all my buttons. There’s a plugin available called KM Link which avoids the whole hotkey process entirely. Just grab the KM Link plugin from GitHub (click the “Code” button and download the zip) and install it by double clicking on the .streamDeckPlugin file. Then you can drag a KM Link action from the Custom section of the sidebar to a button, and in its configuration you’ll get a list of all your Keyboard Maestro macros. Just select the macro to run and you’re done. This means you don’t have to assign triggers to the Bunch macros at all.

You’ll probably want to create some custom icons for your Bunches. Most of mine use an app icon, and I have a little script that takes the name of any installed app and outputs a PNG file, which you can then just apply to your button.

Have fun.

Podcasting with Bunch

Continuing on with Shark Bunch Week… I’ve been talking about Bunch again lately because I’ve been setting up a new one for podcasting (which happened to lead to new features). It’s been a while since I created a Bunch from scratch, and I thought I’d document it for anyone curious about Bunch but intimidated by the syntax and/or number of options. Or just people looking for ideas for getting more out of it. I’ve got the Podcast Bunch set up and working smashingly, so I’ll share that here and detail some of the tricks. I know several people can use some of these tips verbatim — Bunch seems to be especially popular with podcasters.

I’ll break it down one section at a time, but you can see the whole thing in this gist.

Using Moom with Bunch for window management

One of the feature requests I get now and then for Bunch is to allow it to arrange windows. Some other batch launchers have this feature, but they usually have a GUI, and making that kind of thing work with plain text files is an ugly proposition. There is a good option, though.

Moom from Many Tricks is my window manager of choice. It does everything I need to do and does it elegantly. I know there are a few good options out there, but I’ve loved Moom and stuck with it for almost a decade now. One feature that stands out is the ability to store entire workspaces and call them back up by name using AppleScript.

Say you have a Bunch that launches multiple apps, and you find yourself spending time moving and resizing windows every time you load it. This is almost always true if you use multiple displays — most apps are bad at remembering their location, especially if the number of displays changes often. With Moom you can do all of your window arranging once, and then never again (until your preferences change).

Save snapshot menu item
Moom Preferences

Once you have everything where you like it, open the Moom menu and choose Save Window Layout Snapshot…. This will open the Moom preferences with a new “Arrange Windows” entry. Give this a unique title. You’ll probably want to turn off “Ignore obstructed windows” and click the Update Snapshot button. (By default only windows that are 100% visible have their position saved, but I usually have some windows overlapping.)

Note that you can use Update Snapshot any time you change your mind about a window location or add a new app/window to the mix.

Once you have the title set it’s easy to trigger the layout with AppleScript. The command is:

tell application "Moom" to arrange windows according to snapshot "snapshot name"

You can put this in your Bunch file as an AppleScript command that comes after all of the pertinent apps are launched. For example:

Audio Hijack

* tell application "Moom" to arrange windows according to snapshot "Podcasting"

You can create a snapshot for each of your Bunches, add the script line, and then forget about organizing your windows.

If you happen to know that this trick can be accomplished with other window managers, let me know and I’ll add a note for others who might be interested.

The Podcasts: Week of September 7th

I caught up with Greg Pierce, developer of Drafts for iOS and Mac, on Systematic 237 this week. It didn’t get as nerdy as you might expect from the combination of the two of us, but we covered all the fun stuff. I’ve stopped doing my own Top 3 Picks every week, which has been helpful in preventing burnout, but it’s still one of my favorite ways to get to know my guests. You can learn a lot about a person by looking at what they’re excited about, and Greg had many media favorites to share.

Then this thing happened on Overtired 204 where the conversation went from YouTube personalities to the Holocaust in zero seconds flat. It was my fault, I had recently learned about the sordid history behind Aspergers Syndrome. And then I had to find out that IBM was a mover and shaker in… Nazi Germany. I challenge you to pivot from that conversation into fun tech stuff, let alone segue smoothly to the sponsor break that came between. Deftly handled. Or daftly. It’s really hard to tell with this podcast sometimes.

Find all the episodes at systematicpod.com and overtiredpod.com, and be sure to subscribe! My ability to keep the shows going is dependent on my ability to secure advertisers, which is in turn dependent on subscriber numbers. Getting yourself counted in my download stats (and maybe checking out the sponsors now and then) is all you have to do to support either or both shows!

Bunch gets audio control

I haven’t worked on Bunch for a while because it was just doing everything I needed from it. But you know how it goes when you can’t sleep…

It’s been a while since I talked about it, so I’ll just real quick remind you that it’s an app that lets you use plain text files to launch batches of apps, and run Automator workflows, AppleScripts, and shell commands. Oh, and it can do things like toggle Do Not Disturb and Dark mode and change your desktop wallpaper. All sitting in your Dock or your menu bar and just a click away.

Anyway, a couple of days ago I needed to automate switching audio inputs and outputs and I thought Bunch should probably be able to do that. Thus began my first exploration into CoreAudio and some of the intricacies of macOS audio. Obviously my needs were fairly rudimentary, but I did learn a lot in the process.

The latest version now includes commands for switching audio inputs and outputs, and for setting volume. Bunch commands are surrounded by parenthesis, and are pretty flexible with spacing and such. All of the audio commands start with the word “audio”. If you use the following in your Bunch file, it will set the volume to 50%:

(audio volume 50)

That on its own is pretty lame, because you could always just send an AppleScript one-liner to do the same thing. But here’s where it’s a bit handier: you can switch your system input and output devices using partial name matching. Just use (audio input DEVICE NAME) and (audio output DEVICE NAME).

I have a bunch of audio devices on my system. My Scarlett Solo, my Alesis iO Hub, my Komplete Audio 6, plus the built in speakers and some Loopback devices. With this new feature, I can have the system default change when launching or quitting a bunch. As I was just saying a second ago, you can use partial names when referring to your devices; any unique portion of the name will find the right device, and it’s case insensitive. For example:

(audio input scarlett)
(audio output macbook)
(audio volume 0)
!(audio input macbook)
!(audio volume 80)
!(audio output io hub)

That includes both “start” and “stop” commands; the “!” lines will only be run when quitting (or toggling off) a Bunch. So when I open this Bunch it sets my input to the Scarlett Solo and my output to the MacBook Pro Speakers, and then mutes the output. This is ideal for my podcasting setup, as my output from Skype is handled directly by the app and this prevents other audio (dings and whistles) from being heard. Then when I quit the Bunch, it toggles the volume back up to 80% and switches the output to my the iO Hub (which powers my studio monitors).

One caveat is that many external audio interfaces (like ALL of mine) don’t allow volume to be set by the system. So the volume command generally only operates when an internal source is selected. But I haven’t had any issues with the input/output commands on any of my devices, and just being able to mute the internal speakers when needed covers my bases. There’s room to flesh it out more, though, so if you have reasonable requests, let me know!

Just as a reminder, the project page is where I document all of Bunch’s features, and it serves as the only real help system for it. There’s enough there that I’m certain that — were you looking for something to do on a slow day — you could find new and cool things you didn’t even know Bunch did with just a little looking.

I think these tools are a useful addition to Bunch, and I’m already using them in all of my podcasting, music listening, video watching, and screencasting Bunches. Download link for the latest version is below.

Bunch v1.2.8

A Batch app launcher for the macOS Dock

Published 05/14/19.

Updated 09/12/19. Changelog

DonateMore info…

You might be bipolar if…

I talk a lot about having ADHD. Between this blog, Twitter, my own podcasts, and many that I’ve guested on, I find ADHD easy to talk about. And people are, for the most part, receptive to hearing about it. As a disorder, it’s generally understood. It doesn’t scare people.

I have the displeasure of a dual diagnosis, though, and I don’t talk about the other half of it very much. Bipolar disorder is a lot scarier to most people. Hell, it’s scary to me sometimes. I was diagnosed with it in my 20s, long before I was ever diagnosed with ADHD. I’ve been through many different medications, and on the whole I’ve kept it pretty well in check since about the age of 23. But “in check” still has a lot of symptoms. Everything is relative.

So I’m going to talk about it. I’m not here to solve anyone’s problems, just maybe let some people know they’re not alone. Forgive me, this is probably going to get long and then not resolve to the kind of emotional payoff you’d probably hope for after however long this is going to be. Bear with me, I appreciate you hearing me and feeling whatever you need to feel about it.