Welcome to the lab.

Updating the TextExpander Tools

I’ve started going through and cleaning up my large collection of TextExpander snippets, starting with the ones I share publicly. In the process I’m moving away from my homebrew snippet sharing system to using TextExpander’s new(ish) public snippet groups. Once I’ve pruned and updated all of the groups in the te-snippets tool, I’ll redirect that page to a list of my publicly shared snippet groups.

Much like my custom tool, TextExpander sharing lets you define your own prefixes for the group, and it doesn’t take a bunch of XML foolishness on my end to make it work. I like it.

The first group up for a refresh was my “Tools” group, which is kind of a general collection of tools for text, Markdown, and miscellaneous tasks like getting the front Finder window path.

You can find the new group as “Brett’s Tools” on TextExpander.com. Some of its original contents are being moved into more specific groups, and a bunch of the snippets got updates. Only a few had to be removed due to APIs being discontinued or other issues that have popped up.

There’s a new snippet for creating obfuscated mailto: links. It pops up a fill-in for link text, email address, and optional subject line, then spits out an HTML tag that uses a combination of JavaScript and unicode encoding to completely obfuscate the link, including the “mailto” part, so bots are less likely to pick them up. I’ve gotten to the point where I’m getting as much spam from contact forms as I ever got from just putting my email address out there, so in a lot of applications I’m just back to using mailto links. Obfuscating is of questionable value overall, but the general consensus on it is “it’s better than nothing.” This snippet makes it easier to just do it.1

I also updated the “swear” snippet (which turns your swears into “f#@!” for you) to include first letter of censored word. It’s just more fun that way.

Snippets that generate urls now assume https, rather than http.

The “Slugify” snippet (which turns “hey there” into “hey-there”, mostly for file naming purposes) now removes all non-alphanumeric characters and compresses multiple hyphens.

Anyway, check out the shiny new result here. Watch for more updates soon!

  1. There is, of course, a concern about using JavaScript because it’s possible a user won’t have JavaScript enabled, in which case they’d be left with a non-functioning link and no way to contact you. I have an alternate version of this that uses entity encoding, but it’s so rudimentary that I feel like you might as well just use plain text.

Open Zoom links in Zoom (and why Choosy is the best default browser)

Ok, so we’re all in Zoom way too much these days. We’re clicking links in calendar entries, Slack messages, and emails. They’re opening a browser tab every time, which then opens Zoom. I wrote a little script to clean up all those tabs, but that’s a kludge. Choosy is better.

I’ll start with the very simple tip: in Choosy you can add an advanced rule that targets any URL containing “zoom.us” and have it open directly in Zoom, completely bypassing your browser. You don’t even have to add Zoom as a browser in Choosy, just select “Browse…” from the dropdown list when specifying what browser to use and find “zoom.us” in your Applications folder.

There have been a few “default browser” apps for macOS over the years. Notably BetterTouchTool can function as one now, doing all kinds of neat tricks with your urls. The thing is, I’ve never seen one that has the perfect combination of ease and power that Choosy pulls off. Choosy is a breeze to set up, offers a great popup menu either horizontally or in a circle around your cursor, and has all of the advanced features you need.

You can specify all the browsers you’ll ever use, and set their order of preference. You can have Choosy always use the best running browser, only asking you to select one if none are running. Or you can have it offer you a selection of all your browsers, just your running browsers, or automatically assume it should use your favorite if no others are running. It can even expand shortened URLs for you on the fly.

This is all great if you’re a developer and constantly using every browser out there. But it’s also handy for anyone that has some sites that need a specific browser that’s not their preferred browser. You know, the sites you keep Chrome around for even though you prefer Firefox or Safari for everything else. Or, as illustrated above, a need to open links in an app that isn’t normally able to capture URL clicks.

What makes all of that possible is Choosy’s custom rules. Under advanced preferences you can build rules like the Zoom one above. You can have specific url patterns trigger specific browsers. Or have one that detects local HTML file clicks and lets you choose whether to open them in your browser or your text editor (yes, you can add your favorite editor as a browser option). My setup defaults to the best running browser, but if I hold down option when clicking a link anywhere on my Mac, I get a menu of all available browsers. Everything is customizable.

It even has an API and url scheme, so it’s a breeze to integrate into things like bookmarklets and shell scripts.

I know there are other tools like this, and I’d love to hear about your favorites in the comments, but Choosy has served me well for longer than I can remember. It’s absolutely worth the ten bucks, even if just to curb your Zoom tabs.

Choosy is available at choosyosx.com.

Web Excursions for February 26, 2021

Web excursions brought to you in partnership with Udemy. Learn Anything.

A Guide to Palettes - Diagrams
Diagrams 2.0 is out, available on the Mac App Store and Setapp. The new release features customizable palettes for making more flexible flow charts and diagrams.
TextBuddy for macOS – Faster than your IDE and easier than the command line
A new app from Tyler Hall that can perform all kinds of transformations on text with just a couple of keystrokes. Includes OCR and audio/video transcription capabilities. I tried it out for 5 minutes and immediately purchased.
I’ve mentioned NotePlan before, the Markdown-notes-meets-calendar-meets-tasks app for Mac and iOS, but it’s worth pointing out again. Eduard recently added text folding and hidden Markdown links, among other things. Check out this YouTube video for details, as well as a look at how he uses NotePlay for Zettelkasten.
Nord Theme
Via Martin Smith, if you still like dark themes in your IDE, this one is beautiful.
Minus.app — Minimal Productivity for macOS
An interesting take on the minimal workspace for Mac. It’s free, take it for a spin.

Udemy Banner

HardWrap extension for PopClip

I made a quick PopClip extension today for adding hard line wrapping to blocks of text. In general I’m a fan of letting text wrap automatically, but when I’m coding I prefer hard line breaks at 70-80 columns. Easy to do in almost any decent text editor, but elsewhere (ahem, Xcode) I wanted a fast way to do it.

You can install the extension from the latest version of Brett’s PopClip Extensions (download directly below), and the source is available on GitHub.

Credit for the heart of the wrapping code goes to Allan Odgaard of TextMate fame because why reinvent the wheel?

When you install the extension you can define the column at which the text will wrap. You can also define an alternate column, which can then be accessed by holding down Option when clicking the extension (which shows up as \n in your PopClip bar). Holding down Command will unwrap selected text, removing newlines at line endings but preserving multiple consecutive newlines and trailing space.

Just a quick side project, but I thought others might find it useful. Of course, I’d bet money something like this already exists, but it was a nice break from other tasks anyway.

Brett’s PopClip Extensions v1.27

A few PopClip extensions for Markdown writing and other useful tools

Published 11/30/14.

Updated 02/11/21. Changelog

DonateMore info…

LinkChecker: a bookmarklet for web writers

I did a little more weekend work on Bunch, and I’ll probably post an update on some exciting new stuff soon. I’d love it if you helped test by downloading the beta version and checking the changelog to see what’s up. Anyway, that’s not the point of this post.

As part of working on the new release, I’ve been doing a lot of documentation. And because the documentation has continued to grow, there’s been a lot of reorganizing. And as a result of that, I keep breaking links between pages. So I made a quick tool to make finding broken links easier.

Web Excursions for February 04, 2021

Web excursions brought to you in partnership with MindMeister, the best collaborative mind mapping software out there.

If you’re not keeping up with the latest in Bunch, there have a been more updates since my last post. I’d love to have as many beta testers as I can right now, so give it a shot!

Defining a Hyper Key in BetterTouchTool
BetterTouchTool can now create a Hyper Key without the need for Karabiner Elements. Since I define most of the shortcuts I use my Hyper Key for in BetterTouchTool, I’m excited about moving all of this functionality into one place.
Vitor Galvao wrote a great Ruby script for command line control of Do Not Disturb settings under Big Sur. It’s a lot more complicated than it was with previous OSs, so this is a pretty cool feat.
RCDefaultApps was a cool Mac utility for controlling what apps owned which filetypes and url handlers. It kind of faded away around macOS 10.12 (though some say it still works), but SwiftDefaultApps modernizes and revives it. Seems to be working well so far.
VSCode Notion
This is not for me. While I’m always impressed with VSCode, it hasn’t grabbed me yet, despite my Overtired co-host’s enthusiasm. And while I’m impressed with Notion, it’s not my thing either. But I know I have readers who like both of these things, so here you go.
2020 Mac Developers Survey: Key insights
The results of the MacPaw 2020 Mac Developer Survey are in, with some good insights into the state of the industry.
Apple in 2020: The Six Colors report card – Six Colors
Speaking of annual surveys, Jason Snell’s 2020 Apple report card is out, with input from a bunch of Apple bloggers and podcasters (and me).

Check out MindMeister and start brainstorming, collaborating, and boosting productivity.

Bunch gets scheduling (and lots more)

Are you ready? I kinda went down a rabbit hole with Bunch this last week. It’s a lot. Because this release is so big, I’m releasing it as a beta first. All of the documentation for the new version is at brettterpstra.com/bunch-beta/docs, and the download link can be found at brettterpstra.com/bunch-beta/download.

The documentation for everything here is fully updated (and expanded, as part of the aforementioned rabbit hole), and all of the pertinent pages are linked from the changelog. You can just skip there if you like.

First, the blame for this whole development cycle belongs partially to one Jake Bernstein. He had a couple ideas that I thought were pretty clever, and it was a slippery slope from there. Scheduled Bunches and Spotlight searches were mostly his fault. I’m far from blameless in this, but just I want him to share in the responsibility. Well, really I just wanted to give him credit.


The first big thing is that I’ve introduced frontmatter. It’s YAML-esque formatting that lets you define attributes and variables at the top of your Bunch file. This means additional settings without further complicating the syntax. Just nice, readable keys and values.

title: 👍🏻My Cool Bunch
startup: true

First benefit: you can use a title key to define a display name that’s different from the filename. Which, of course, means that you can use emojis in your menu titles. A vanity feature, but I really like it.

You can define whether a Bunch launches at startup with the startup key, as an alternative to using startup scripts.

You can also define arbitrary keys and values that can then be referenced as variables in your snippets.

I know what you’re asking yourself at this point. “Did he really stop with just having static data at the top of a file?” No, of course not. Frontmatter can also be dynamically loaded from external files or shell script output.

So that’s nice and all, you say, but is there any real benefit to having frontmatter?

Another round of Bunch Updates

Ok, one more batch of updates for Bunch. It’s just so much fun to work on that I spent last weekend on it. Don’t worry, nvUltra is getting an equal amount of love.

By the way, if you want to keep tabs on all of my latest work, apps, and special discounts, I formally invite you to subscribe to my new email list. It’ll be low-traffic and a great way for me to let you know about the important stuff.

Anyway, Bunch…