
Brett Terpstra
Brett is a writer and developer living in Minnesota, USA. You can follow him as ttscoff on Twitter, GitHub, and Mastodon. Sign up for the email newsletter, and keep up with this blog by adding it to your favorite news reader.
Thanks to TextExpander for sponsoring BrettTerpstra.com this week!
Get your team communicating faster so they can focus on what’s most important — with TextExpander your team’s knowledge is at their fingertips.
Get your whole team on the same page by getting information out of silos and into the hands of everyone that needs to use it. You can share your team’s knowledge across departments so your team is sending a unified message to your customers and isn’t spending time reinventing the wheel.
Here’s how it works:
Store It
Keep your company’s most used emails, phrases, messaging, URLs and more right within TextExpander.
Share It
Get your whole team access to all the content they need to use every day. Organize it by department and
Expand It
Deploy the content you need with just a few keystrokes on any device, across any apps you use.
It’s that easy!
TextExpander is available on Mac, Windows, Chrome, iPhone, iPad.
BrettTerpstra.com readers get 20% off their first year. Visit textexpander.com to learn more.
Thanks to TextExpander for sponsoring BrettTerpstra.com this week!
What would you do with a little more time in your week? Repetitive typing, little mistakes, searching for answers – they’re all taking precious minutes from you and your team. With TextExpander, you can take back your time so you can focus on what matters most in your business.
With TextExpander, you and your team can:
The way we work is changing rapidly. Make work happen wherever you are by saying more in less time and with less effort using TextExpander.
TextExpander is available on Mac, Windows, Chrome, iPhone, iPad.
BrettTerpstra.com readers get 20% off their first year.
Visit textexpander.com to learn more about TextExpander.
I put some time into Bunch this weekend. It’s been a little while since I’ve worked on it — I haven’t needed it to do anything new lately, and the current release hasn’t had any major bug reports. So it’s been happily humming along. But there was one feature request that I did keep receiving and decided to take another look at.
The request is for support for Monterey’s focus modes. Bunch does a decent job of enabling and disabling Do Not Disturb, but the process is a hack that involves nested settings in PLIST data and toggling system daemons. I don’t love that I have to do that, but Apple provides no API for such settings. And I haven’t found a way (yet) to extend that hack to work with Focus Modes. So I offer a workaround: you can turn Focus Modes on and off using Shortcuts, and you can easily run Shortcuts in a Bunch using the shortcuts
CLI.
Create two shortcuts for each focus mode you want to control from Bunch, one for turning on, and one for turning off.
Then, in a Bunch, you can use $ /usr/bin/shortcuts run "SHORTCUT_ON_NAME"
(replacing SHORTCUT_ON_NAME
with the name of the shortcut that turns the focus mode on), and !$ /usr/bin/shortcuts run "SHORTCUT_OFF_NAME"
. The combination of these two will turn the focus mode on when the Bunch opens, and off when it closes. You can, of course, reverse these as needed.
$ /usr/bin/shortcuts run "Work Mode"
!$ /usr/bin/shortcuts run "Work Mode Off"
There is no step 3.
Now when you open and close the Bunch, your desired Focus Mode will toggle on and off with it. It’s a couple extra steps beyond having a Bunch command to handle it, but I don’t foresee being able to incorporate them directly. Of course, I may just be missing something in the API that would make it possible without deep hacks, in which case I will definitely incorporate it.
Another request I got led to a couple of bug fixes. The following currently only works in the 2.4.8 beta (download here), but if testing goes well, it will be released to the stable version in short order.
What came up was the idea of having Single Bunch Mode apply to subsets of Bunches.
Single Bunch Mode can be enabled in preferences and simply means that when a Bunch opens, all other Bunches close, so you’re only running one at a time. Because Bunch is built for “context switching,” this makes switching your working context a single step. You can have any Bunch ignore Single Bunch Mode using frontmatter, so Bunches that should always be running can be easily excluded.
However, you might want to have multiple groups of Bunches where only one Bunch within the group is running at any given time. This can be accomplished with Bunch’s tagging features.
To tag a bunch, you just add frontmatter:
tags: work
Tag all of the Bunches in this subgroup with the same tag. Then, in each Bunch in the group, use the \tag
syntax to act on the tag. Use !
to indicate you want to close the tagged Bunches, and include a %
sign to ignore the directive when closing (so it doesn’t reverse it and reopen all of the tagged Bunches).
%!\work
This effectively gives you Single Bunch Mode for subsets of Bunches. If you ever want to do that, give it a shot.
Thanks to TextExpander for sponsoring BrettTerpstra.com this week! TextExpander will be one of the very first apps I install when I get my brand new Mac Studio!
In our fast-paced world, things change constantly — and errors in messaging often have significant consequences.
TextExpander lets you make new approved messaging available to every team member instantly with just a few keystrokes, ensuring your team remains consistent, current, and accurate.
Get your message right every time: expand content that corrects your spelling and keeps your language consistent with just a few keystrokes.
Your team members will always get the right message to the right person at the right time — it’s way faster than copy paste and way more reliable than your memory.
BrettTerpstra.com readers get 20% off their first year. Visit textexpander.com to learn more.
Web excursions brought to you in partnership with CleanMyMac X, all the tools to speed up your Mac, in one app.
Introducing 1Password for SSH & Git (Beta), the single source of truth for all your SSH keys.
After about a year of personal experiments, I present you the “Zettel Composer”, a script for combining Zettelkasten notes in a variety of situations: browsing annotations, publishing a book or a paper, assembling a handout for lectures or conferences etc.
ksdiff()
function to the debugger that you can call from the console or breakpoint actions. It can also diff the source and CSS of any page or element, which is amazing for web development and debugging. Nice work!I’ve added some stuff to Doing lately. Like, a lot of stuff. To be fair, I’ve also done a lot of jobby job stuff. And worked with Fletcher on nvUltra. And started a rewrite of Gather as a menu bar clipboard web Markdownifier with integration with multiple apps (that one’s going to be cool if I finish it). And some time on Bunch. But as I’ve said before, the one thing I use when working on all of these is Doing. And I always want it to do something new or better, so it gets some attention.
Oh, and looking at my doing recent
output reminds me that I also tried my hand at creating my first oh-my-fish plugin yesterday. It has some dependencies and I don’t think it’s right for the main packages repo, so you have to add the repository manually to try it out, but I think it’s fully functional. If you want intelligent directory navigation with bookmarks, fuzzy matching, and fasd/fzf integration in Fish, all in your cd
command, check it out.
Anyway, what were we talking about? Hang on:
Right. Doing updates. To get the latest version, just run gem install doing
, which as of this writing should get you at least version 2.1.34. (If you get an error, run the same command with sudo
.)
It’s been a while since I mentioned my macOS key bindings, so if you’re new around here, let me point you to my previous work.
I’m pretty crazy about text input shortcuts and have spent a fair amount of time honing a system that lets me use selection, editing, Markdown, HTML, and other shortcuts everywhere you can type on macOS. I’m so used to them I make a mess typing on other people’s computers. I try to avoid doing that. Typing on other people’s computers, I mean.
I share a large collection of all of my favorite key bindings on GitHub. Everything is contained in the file DefaultKeyBinding.dict
, which is what macOS reads all key bindings from. In that file I use formatted comments to describe each binding, and I can generate the README and blog page by parsing the bindings file itself. The script that generates the table of shortcuts creates it in Markdown and then uses MultiMarkdown to output the document, ready for GitHub or my project page.
I also generate a cheat sheet for Cheaters from it, but I’ve been using Dash more than Cheaters for the last couple of years. So I wanted my key bindings in a Dash docset for quick reference.
Yes, there is such a thing as too many shortcuts. I walk that line. But I manage to not have so many that I’m accidentally triggering them while doing something else, so I think it’s just the right amount. It’s just more than (even) I can remember all at once. Which is why a searchable cheat sheet you can pop up with a keystroke is handy.
So I modified the documentation generator to output a template for the cheatset gem. It will read whatever is in your KeyBindings.dict file and generate a Keybindings.docset
file for you based on the definitions and comments in the file. So you can take my oversized DefaultKeyBinding.dict
file, trim it down to what you want to use (leaving comments in place), and generate a custom cheat sheet for your own key bindings.
Download the code to get the script (and the bindings file). Make it executable with chmod a+x cheatset_keybindings.rb
. Before running it, you’ll need to install the cheatset gem: gem install cheatset
should do it, though you might need sudo gem install cheatset
, depending on your setup.
You can point the script to whatever DefaultKeyBinding.dict
you like by passing a path as an argument. It will default to using the one in ~/Library/KeyBindings
.
The script can output the key combinations either as symbols, e.g. ⌃⌘p
or as names, e.g. CTRL+CMD+P
. “Name” is the default format; to output symbols instead, use --format symbol
.
You can also change things like the docset title and description using command line flags. Just run cheatset_keybindings.rb -h
to see the options.
By default the script will generate the template, then run cheatset to generate the docset, and then delete the template, leaving just the docset. If you just want the template, run the script with --save
. Then you can edit the template and run cheatset generate TEMPLATE
yourself.
I made this because I needed it, not because I expected it to be a popular project. If it’s of use to you, though, please enjoy!
Thanks to TextExpander for sponsoring BrettTerpstra.com this week!
In our fast-paced world, things change constantly — and errors in messaging often have significant consequences.
TextExpander lets you make new, approved messaging available to every team member instantly with just a few keystrokes, ensuring your team remains current, accurate, and consistent.
Get your message right every time: expand content that corrects your spelling and keeps your language consistent with just a few keystrokes.
Your team members will always know the right message for the right person at the right time, without relying on memory or copy and paste.
BrettTerpstra.com readers get 20% off their first year. Visit textexpander.com to learn more!
I’m late getting my “Top Apps of 2021” post out. I almost wasn’t going to do it this year, mostly out of just being frequently and excessively tired of late. But I figured I’d keep it short and make it manageable, and at least let you know what I think are the cream of the crop Mac apps this year. This is nowhere close to a comprehensive list of apps I like, but rather apps I love that were new or substantially updated in 2021.
I’m forgoing1 iOS apps because I just haven’t found anything new that blew me away this year2.
Many of the apps below are available on Setapp. If you want to check it out and get access to 100+ awesome Mac apps (and some iOS companions) for a low monthly subscription, here’s my affiliate link. I get a little something if you sign up, and if you happen to use my apps through Setapp, I also get a piece of your monthly payment, which I think is nicer than switching an app like Marked 2 to a subscription model on its own.
And we’re off.
That’s it (for now). Short and sweet. I might do a second installment if time allows, but for now have a great 2022!
Today I learned that there’s a difference between “foregoing” and “forgoing” (other than an “e”). Glad I caught that one. Would have looked mighty silly. ↩
To be fair, I do not do a lot on iOS other than social media, email, text messaging, and games. Which I guess is a lot, but other than games, none of those areas are rife with competitors and new ideas. ↩
Thanks to TextExpander for sponsoring BrettTerpstra.com this week!
What would you do with more hours every month? Repetitive typing, little mistakes, searching for answers – they’re all taking precious time away from you and your team. With TextExpander, you can take back your time so you can focus on what matters most in your business.
With TextExpander, you and your team can:
The way we work is changing rapidly. Make work happen wherever you are by saying more in less time and with less effort using TextExpander.
You will never need to copy-paste repetitive responses again — with TextExpander, your knowledge will always be at your fingertips with a quick search or abbreviation.
Here’s how it works:
It’s that easy!
TextExpander is available on Mac, Windows, Chrome, iPhone, iPad.
BrettTerpstra.com readers get 20% off their first year.
Visit textexpander.com to learn more about TextExpander.