Welcome to the lab.

The MacSparky Photos Field Guide (+Giveaway)

David Sparks is back with another installment in his Field Guides collection, this time a second edition of his Photos Field Guide.

The Field Guide includes almost six hours of video training on Photos.app, covering topics from library management, organizing, and sharing to taking better pictures and tips for editing/retouching them. The Field Guide comprises 123 videos in total.

The price for the course is $29, but it’s discounted for launch to $24. David has also graciously supplied a few codes for BrettTerpstra.com readers.

Sign up below for your chance to win one of three (3) free copies of the Photos Field Guide Second Edition (value $29/ea). Winners will be drawn at random on Friday, May 29th, at 12pm Central Time. Email required to enter, used only for notifying winners (it will be deleted from my server after the drawing and never shared with anyone).

Sorry, this giveaway has ended.

Be sure to check out the wide selection of Field Guides on a ton of other topics as well!

Web Excursions for May 21, 2020

Brett holding map

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

10% Off The Lab merch
Use code M3RCHSALE for 10% off anything in The Lab shop (all my t-shirts, mugs, and stickers), today only (21 May 2020).
An elegant version of a micropayment version of the web, with a decent spread of publishers already on board. No extension necessary, your login cookie automatically causes sites to hide ads and disable trackers. Free trial, affordable subscription.

I love the idea of directly supporting publishers—who continue to own their content—so they can skip the ads and trackers. Scroll isn’t the first attempt at this, but it has more potential for wide adoption than some others I’ve looked at. Here’s how Scroll works.

A terminal multiplexer (inspired by i3) with out-of-the-box support for search, mouse-controlled scrollback, and i3-like keybindings. I love tmux but I can live without the scrollback/copy rigamarole it entails.
GoldenChaos-BTT: The complete Touch Bar UI replacement
If you haven’t already customized your Touch Bar extensively, this is an amazing BetterTouchTool preset group that adds a ton of configurable functionality. Via @Cliophate
This is a great idea: a Slack bot that converts links shared in your channels to an RSS feed you can peruse at your convenience, using whatever tools you prefer for RSS reading.

Automating NiftyMenu

Banner Image

So I needed to update my menu screenshots for the nvUltra documentation, which meant revisiting my NiftyMenu setup. In case you haven’t been raptly following the progress on that little side project, it’s a little tool that replicates any macOS app’s menus in HTML and allows for more flexible and consistent screenshot creation.

For a while it’s been 90% of the way to being a perfect tool for updating my documentation’s screenshots. It can easily set the background image, lock a menu item in place, add callouts, and even automatically shoot the screenshot, all repeatable via JavaScript. I’ve let go of the idea of ever having it so automated that I can include it as part of a build script, but I do have it to a point where it’s pretty close.

I added two new features to get me there: the screenshot (.shoot()) command now allows you to specify a filename, and there’s a Nifty “terminal.” The former means I can script menu screenshots and save them with filenames that match (and therefore update) existing screenshots in my documentation. The latter simply avoids the step of opening the Web Inspector, which is more a novelty than a requirement.

I will reiterate at this point that the screenshot capability of this tool only works in Chrome. But it works so well in Chrome that it’s worth running Chrome for it even if it’s not your primary browser.

The Terminal is opened by hitting $ while viewing a NiftyMenu HTML page. Paste JavaScript into it and hit Run. The pasted text will be split at semicolons and trimmed, run one “command” at a time. Because the NiftyAPI is all about chaining, you can write the entire script as one “command.” Here’s one that updates three nvUltra screenshots:

    darkMode   : false,
    bgImage    : true,
    arrowStyle : 'arrow',
    wallpaper: 'https://cdn3.brettterpstra.com/uploads/2020/05/uDTexture0015.jpg'
.find('edit/paste as').arrow().shoot('paste-as@2x%%r1000oh')
.find('format/convert selection').arrow().shoot('convert-selection-to@2x%%r1000oh')

I just keep that snippet in a text file in the same folder as my Markdown documentation, updating it as I add new screenshots. Whenever I paste it into the Nifty Terminal and run it, it instantly saves the updated screenshots to Downloads (occasionally shooting so quickly that I have to tell Chrome to “allow multiple downloads”). The weird %% suffixes on the specified filenames trigger a Hazel rule that then creates 1x and 2x versions, optimized and ready to move to my documentation folder.

Because the .find() command is fuzzy (it will find the closest menu item title match, even if the letters are non-contiguous), it’s resistant to changes to the menu ordering and wording. This means that as new menu items are added and I need to update the screenshots, I just have to regenerate the menus themselves (simply running the niftymenu.rb script); the script to generate the screenshots rarely has to change. And I can switch it to shoot in Dark Mode or with a different wallpaper just by editing the .config() call.

YouTube Video

The latest version with these changes is up on GitHub, if anyone else is tempted by the siren call of automating mundane tech documentation screenshots.

BrettTerpstra.com t-shirts

Banner image

As part of a larger roundup this last week, Michael Raphael was kind enough to remind people on Twitter that I do, as a matter of fact, have T-shirts for sale. I figured I’d remind folks here, too.

Updated, with apology: Not having anything in my own culture or heritage that I consider off limits for a joke, I’m not always sensitive to the culture and heritage of others. I realize, though (a bit late, obviously), that the Spirit Animal t-shirt was likely offensive to some, and I’d rather not perpetuate that. I’m pulling that one from sale, to be replaced with something unoffensive when I come up with a way to humorously express the same sentiment in a more culturally sensitive way. I apologize to anyone I offended. The ones that have sold thus far are officially “limited edition,” but if you want a replacement, just let me know. I’ll eat the cost and get you something else if needed.

I don’t make a huge profit margin on the shirts and other accessories, but this is one way I can ask for support and provide something tangible in return. Donations to my “coffee fund”, of course, have a higher profit margin for me. As a consequence of being self-employed, I don’t make anything on all of my dev time until a product (cough nvUltra) ships, so your support of my non-commercial pursuits and all of the stuff I share for free helps me get through.

While I work on a new design, there’s the Lab 2.0 logo t-shirt, now available in a premium tri-blend, or perhaps the **BOLD** coffee mug, as an ode to my love of Markdown. See all the available styles at The Lab storefront. And don’t forget about the Rock Scissors collection, including new material options for (my favorite t-shirt I’ve ever made) the I Wanna Be shirt.

Thank you for all your support!

Web Excursions for May 6, 2020

Brett holding map

Web excursions brought to you in partnership with Codecademy, the easiest way to learn to code.

In case you missed the flurry of posts about this recently, it’s an iOS app for Apple Watch that gives you detailed control over a watch face and a bunch of new complications.
Speed up your Mac via hidden prefs

While none of these changes will make a slow Mac feel like a brand-new machine, they can help the actual and apparent speed of your interaction with the OS…

Tumult Whisk
I personally need tools that can handle CSS pre-processors and do fine with grunt and livereload, but this is another slick looking option for an all-in-one editor and live preview.
Aerial Brings Apple TV Screen Savers to the Mac
Get all of the aerial screensavers on your Mac, with a ton of options and settings.

We believe that we should be truly relaxed before working. The main idea is to have a longer break period than work periods. So we “inverted” the Pomodoro timer and called it Doropomo…

Codecademy Pro