Welcome to the lab.

Let’s get crazy with BetterTouchTool and Touch Bar Simulator

I’ve recently put some1 time into making a Touch Bar “dashboard” using BetterTouchTool. I know, the first thing you thought when you read that was “but Apple is discontinuing the Touch Bar!” Let me explain. Or try to. I almost didn’t write this post because I was worried it would indicate mental instability of some kind2. But how could I call myself a “Mac Mad Scientist” if things didn’t get a little crazy? We’re all mad here, right?

Brett's Touch Bar

So I had a MacBook Pro with a Touch Bar for a couple of years. I immediately loved the idea of the Touch Bar, made it do a few cool things, and generally appreciated the fact that it was there, offering contextually-relevant and visually identifiable “keys.” Did I actually use it? Not a lot. I had a cool script that made buttons for tasks that howzit could run in the current directory when I was in the terminal, and I used that quite a bit, but other than that, not really.

Howzit tasks in the Touch Bar

90% of the time my MacBook was on a stand next to an external display, being controlled from an external keyboard and trackpad, and the Touch Bar was, at best, inconvenient to reach. I’d stretch to it on the occasions I needed to use Touch ID or run a howzit command, but not for any of the other features it offered. So I didn’t really miss the Touch Bar when I moved over to an M1 Mac mini.

Software mute for XLR mics

Over the last couple of years I’ve spent an upsetting amount of money trying to find a cough button solution for my XLR mic setup. The audio interface I fell in love with (Komplete Audio 6) wasn’t compatible with Shush, the cough button solution I’d used for years with my USB mics. So I started looking at hardware solutions.

The best one I found was the Pro Co Power Mute (after I added a foot switch topper to it). But when I switched to using a Rode Podmic, something about my setup caused the Power Mute to start adding a buzz to the line. No amount of troubleshooting would get rid of it without switching mics, so I ended up continuing my search and settling on a Rolls XLR A/B Switch. You just leave one of the XLR inputs empty and toggle between the hot and empty inputs. It does a fantastic job, and I imagine it will continue to work perfectly even when I inevitably change mics1 and/or audio interfaces in the future. The biggest drawback is that the button takes a significant amount of force to toggle, and thus it makes a better foot switch than a desktop one, which is a bit of a bummer for me2. Nonetheless, with no less than 4 XLR hardware mutes in my arsenal now, I once again had a solid cough button solution.

As fun as a dedicated switch can be, though, I still found I missed the convenience of toggling mute with a keyboard key. I’m afraid I’ve lost track of where this tip came from, but whilst sharing these adventures on social media, it was pointed out to me that Rogue Amoeba’s Loopback could make any audio interface mutable, and thus able to work with USB mic mute solutions like Shush. I ended up switching away from Shush, but I’ll get to that in a second.

Loopback isn’t cheap, but it’s so handy and so powerful that if you’re working with audio — whether streaming, podcasting, producing music, or using audio routing for any reason — it’s worth the investment ($99). And to make your XLR mic mutable with Loopback, all you have to do is create a virtual device with your USB audio interface as the input. That’s it. Keep the default output channels and give the device a unique name.

Now you can just set your microphone input in any app (Skype, Zoom, etc.) to the virtual device. Any USB muting app will be able to cut the input with the press of a button.

The problem I ran into with Shush is that it mutes ALL USB devices, and with the audio routing I have set up, that meant it was also muting my guest on a Skype call. That’s not workable. I tried a few other apps, and the one I landed on is called Mikrofon. It lets you assign a shortcut and select exactly which audio input to mute. The only drawback is that it doesn’t have push-to-mute. It has push-to-talk, but the only other choice is a latching toggle. Which is working out ok, though I’d like to lodge push-to-mute as a feature request.

I have an extra key on my Ultimate Hacking Keyboard (a trackball click on the key cluster thumb module, actually) mapped to toggle Mikrofon, and I get a nice red icon in my menu bar letting me know I’m muted. The button is silent, and there’s no pop or click when muting the channel.

Aside from podcasting, I also use this on Zoom calls, leaving myself unmuted in the Zoom app, and then just controlling my mute with a keyboard shortcut. If I’ve wandered off into another app during a meeting, it makes it easy to unmute myself and respond to somebody without having to switch back to Zoom and find the mute button.

Even at $100, Loopback costs less than the cheapest hardware solutions, plus it can do so much more than just this. If you want to avoid buying a hardware cough button for your XLR mic setup, I recommend checking it out.

  1. Torn between the Sure BETA 87A and the good old SM7B. One way or another, I’ll be changing mics again. 

  2. My desktop converts from a sitting desk to a treadmill desk, and having foot pedals just means more stuff to move around when I want to put the treadmill down. Not impossible, but inconvenient. 

BrettTerpstra.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means to earn fees when linking to Amazon.com and affiliated sites.

A non-slip keyboard tray solution

I asked on Twitter about “rubberizing” my keyboard tray. I didn’t know where to begin solving this problem. I got some very helpful feedback and thought I’d follow up with the solution that worked for me, on the off chance it helps someone else.

I use a 6-way adjustable keyboard tray mounted underneath my NextDesk. My particular model isn’t available right now, but there are others like it. It basically lets me adjust position and angle on three axes, giving me the perfect ergonomic keyboard position whether I’m sitting or standing. And its big enough to hold a trackpad, a split mechanical keyboard, and a 15-key stream deck. And a Shuttle Xpress, though that’s not working for me anymore, with the combination of Big Sur and an M1 Mac mini (I can’t remember which one did it in). In short, I love this keyboard tray, except for one issue: its slick surface tends to let things slide while I’m working with it angled forward to any degree.

So I wanted to make the surface sticky. I didn’t want to get into rubberized paints, but I’d also tried those big gaming mousepads without luck. After trying a few things, I think I found the right solution.

First, I found this roll of non-slip stuff that feels like latex (though is supposed be latex free). It was good and tacky, but it was also shiny and immediately began collecting dust and cat hair. It also was a bit too sticky. I didn’t realize I wanted to be able to move my trackpad a bit as I switched position until it was no longer an option. Then I tried this stuff, which is more like a foam mat, similar to the surface of a standard mouse pad. It was the right amount of sticky, but it wasn’t sticky enough to keep the whole thing from sliding a little over time. I tried a few other things, like kitchen drawer liners, but the perfect solution ended up being a combination of the first two.

The too-sticky, too-shiny stuff made a perfect base for the not-sticky-enough roll of foam stuff. Both easy to cut to size, and the tacky layer is enough to keep the foam from sliding, while giving me the right amount of traction on the top side. Neither one is actually adhesive, so they’re easy to remove and clean when needed. It’s kind of a perfect solution. Both rolls come with enough material to do this a few times over, which I doubt I’ll need to do, but I assume that at some point in the future I’m going to want to make something else less slippery. I’m sure the cost will even out eventually.

Just thought I’d share, especially since the question seemed to get an unusually high response on social media. I’m apparently not alone in this need.

BrettTerpstra.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means to earn fees when linking to Amazon.com and affiliated sites.

Doing (more) with more tags

I’ve added a few new things to my command line time tracker, doing, with an emphasis on adding power to @tagging.

Several commands now accept --tag= as a flag, creating a filter that looks for the last entry (or entries) tagged with a specific tag (or combination of tags). doing last, doing finish, doing again (which is a new command that duplicates a previous task and starts it with a new timer) all accept --tag= to act on a tagged entry rather than the last chronological entry. All commands that accept --tag= also accept --bool=, so you can specify multiple tags separated with commas and then use --bool= to define how they’re combined (AND, OR, or NOT). Run doing help COMMAND (after updating to the latest version, of course) for any of these commands for more details.

The doing last command now accepts -e to edit the last entry in your $EDITOR. Combined with --tag=, you can edit previous entries much more easily. The entry opens in your editor with the title as the top line, and any notes on the following lines. You can update the text, tags, and note, and when you save and close the doing file is updated with the changes.

Most commands that support --tag= also support --search=. This provides fuzzy search for recent entries. If you specify a string, such as doing last --search="Test", the command will search your recent entries for something containing the letters of the string, case insensitive and in order, but separated by up to three characters each. So “Test” would match “the satire.” For doing last, you can add the -e switch to be able to edit the last entry matching a search.

As I mentioned above, doing again (aliased as doing resume) allows you to restart a finished task (as a new task), or end the previous task with the current time and start it again with a new timer. With the --tag= flag, you can now repeat an entry from earlier in the list based on tags. Which means that making liberal use of tags can now be a major benefit beyond just time tracking.

I also added doing cancel, which adds @done tags with no timestamps to recent entries, so no accumulated time is recorded for them. doing cancel also accepts the --tag= flag, so you can cancel the last tagged entry rather than just the most recent entry.

I also added a configuration key called run_after which will execute an arbitrary command or script after any command that modifies the doing file. This ties into a fun BetterTouchTool/Touch Bar/menu bar integration that I’ll write more about soon. You can also now define both editor_app (which is the app that the doing file is opened in with doing open) and config_editor_app (which is the app that doing config will open the configuration file in).

You can update doing using gem update doing. If you want to learn more about exactly what doing is, visit the project page.

Jay Miller: Using Bunch for Creating Newsletters

Jay Miller has published his first video on Bunch. It’s a walkthrough of a Bunch he uses for automating his email newsletter process, and is a great example of Bunch’s usefulness. It highlights some cool Bunch features like embedded snippets and calling Keyboard Maestro URLs, as well as some features that would be considered more “advanced,” such as assigning variables with script results and using variables in conditions.

Thanks to Jay for making this, and I look forward to more in the future!1

YouTube Video
  1. No pressure, though. This is a great video all on its own, and I really do appreciate it. It’s not like I’m paying anybody for this stuff. 

Web Excursions for June 29, 2021

Web excursions brought to you in partnership with MightyDeals.com, featuring great deals on software, training, and design resources.

Running a CPU benchmark on Apple Silicon M1
Peter Forret created a cool bash script that performs a cpu benchmark using ffmpeg and primitive. If you fork the repo and run it, you can commit the results and create a pull request to add them to the repo. Nobody seems to have done it yet (other than me), but I’d be curious to see a few more results from M1 machines, as well as comparisons to Intel machines. Pitch in if you feel the same!
Bookmarklet for Pins.app (1.6+)
A browser bookmarklet for the Pinboard app Pins, which added support for the necessary URL parameters in version 1.6.
Hey, I sped up Apple Mail Rules
AppleScripting the creation of Mail.app Rules is a great tip from Dr. Drang. (Yes, I use MailMate, and my SaneBox @SaneBlackHole covers this particular use case for me, but it’s still a great tip. Also, yes, the persistent emails of the type Dr. Drang describes are super annoying.)
A service that will host your static website with a CLI that makes publishing a one-step process. Support for SSL, custom CNAME, custom 404s, and more. It’s kind of insane that this is free.
Sync Safari Reading List bookmarks to Pinboard
Samuel Kordik built on work from Zach Fine and updated my old Reading List Catcher script to work in these modern times. It’s a Python script that syncs your Safari Reading List to Pinboard (and a Markdown file, to boot). You need to add a “secrets.py” file with your API key, and install the pinboard and pytz packages, but other than that it “works right out of the box.”

Bunch 1.4 is here

Welp, I did it. Bunch 1.4.0 is officially out, and is showing up as an automatic update for unsuspecting Bunch users as I write this. This should probably (definitely) have been a major version bump to 2.0, but I didn’t because that seemed grandiose. I mean, it is a grandiose update, but let’s not get ahead of ourselves.

Quick recap for newcomers: Bunch is a macOS automation tool that runs on plain text files. At its most basic, you can just type out a list of apps you want to launch. Save the text file to Bunch’s folder, and it shows up in a menu in your menu bar. When you click it, all those apps launch. When you click it again, all those apps quit. It goes way, way beyond that capability, but that’s the idea. Everything you need to set up a context (writing, podcasting, zooming, relaxing… whatever you’re doing next) in plain text. Add new automations just by creating new text files, and edit automations as easily as typing in a text editor.

I added a “What’s New?” page to the Bunch site. I culled the list of changes since the last stable release from 247 entries to the 36 items that I think users should be aware of. I won’t rewrite that here, but if you’re on the stable version (1.3.6) and have never touched the 1.4 betas, I encourage you to check it out and get a feel for all the updates. The changelog itself is overwhelming at this point, so hopefully the “What’s New?” page distills it enough to be a starting point for exploring new features.

Side note: I’m sure I’ve mentioned it before, but the Bunch docs are all written in Markdown and the site runs on Jekyll. The markdown is in a public GitHub repo. When I release a Bunch update, the repo get a matching version tag. I wrote a Jekyll plugin that shows diffs of the docs between releases as a section at the top of the changelog. Because the first thing I do after adding features or making improvements is to write about them, the “Recently Updated Documentation” section offers a nice, detailed look at the latest changes.

Version 1.4 is easily 10x more powerful than the last 1.3 version. It’s hard to quantify in any meaningful way, but the addition of frontmatter, expansion of variables, inclusion of conditional logic, interactive dialogs, single site browsers, embedded snippets, and a hundred other shiny new things make it a major upgrade. My only fear is that users still on 1.3 were entirely happy with the way it was, and this will just overwhelm them. Hopefully, though, everyone will be as delighted as I am by version 1.4.

The Beta program will continue as it has, with frequent releases for those willing to help test whatever craziness I come up with. I’ll be making more regular updates on the stable channel, though, so there’s no longer any pressure to get on the beta just because the stable channel is so far behind it. If you do want to get the latest stuff first, just grab the Beta — you’ll see the link under the big download button on the download page.

Download the latest version, check out what’s new, and don’t hesitate to jump into the discussions (a great place to ask for tips or share ideas) or file bug reports1 if you have any issues.

Lastly, I know of a couple people working on videos/posts about Bunch. I’m super into that. If you want to share your thoughts with the world and need anything from me, don’t hesitate to ask.

  1. There Will Be BloodBugs