Category Archives: Mac

How to provide file icon thumbnails in macOS

Update My PreviewMarkdown app, which provides Markdown file previews and icon thumbnails in Catalins, is now available from the Mac App Store.

Providing content-based icon thumbnails in macOS Catalina follows the same pattern as generating file previews: QuickLook runs code from an app extension and calls a function within that code to draw the image that will be placed on the icon.

thumbs
Markdown file previews in Catalina, courtesy of PreviewMarkdown
Continue reading

How to create file previews in macOS

Update My PreviewMarkdown app, which provides Markdown file previews and icon thumbnails in Catalina, is now available from the Mac App Store.

macOS Catalina introduces a new mechanism for providing file previews and content-based file icons. The system for doing this is still QuickLook, but the standalone or app-hosted QuickLook generators that have been in use for some time have been deprecated in favour of delivering this functionality through app extensions.

preview_cat
A Markdown preview in Catalina, courtesy of PreviewMarkdown
Continue reading

pdfmaker 1.1.0 released

I’ve just released version 1.1.0 of pdfmaker. You can view the source code here, and download an installer package here.

You can now select a single source file, not just a folder of files, and you specify the output PDF’s filename as part of the specified destination path, rather than separately (so the --name switch has been removed).

For a more detailed post about pdfmaker, click here.

How to fix iCloud bookmark sync glitches

Has iCloud and/or Safari just borked your bookmarks? This happened to me yesterday; here’s how I fixed it…

Continue reading

How to make one PDF from multiple images on macOS

Google the title of this post and you will get plenty of results, but all almost all of them steer you toward opening the image or images in macOS’ Preview app and exporting to PDF. Yes, this method works, but it doesn’t give you much control over the process, and it’s not scriptable.

Continue reading

macOS image manipulation with sips

macOS has long included a command line tool called sips. It’s a comprehensive image manipulation tool that can also be used to apply ColorSync profiles. Being a command line tool, it’s available to be used in scripts written to perform repetitive tasks.

A case in point: I regularly apply a fixed set of attributes — height, width, format, dots-per-inch (DPI) resolution — to batches of image files, and sips allows me to do that without firing up Pixelmator or Gimp to change each image individually.

Continue reading

How to display your Raspberry Pi’s desktop on a Mac

Additional Check out how to view a Pi desktop on an iPad in this post.

I typically connect to my Raspberry Pis via SSH from my main machine, a Mac. This is fine for pretty much all of the tasks I perform on the Pis, but it only provides access to the commmand line. That’s not a problem for me, but I nonetheless wondered whether I might be able to access the Pi’s desktop UI remotely too.

Continue reading

Make a Mac ‘Task Done’ NeoPixel notification light

Update There’s now a new post containing revised, working instructions for this project.

Note This article was written some time ago, and the libraries used do not work with recent versions of macOS.

I regularly back-up my Raspberry Pi storage card because it’s so easy to damage the card with an improper shutdown or some such. I back up to a Mac, and you can read how I do it here. This wasn’t much of a chore in the early days when I was working with 4GB cards, but now I use 16GB Micro SDs and I know of folks who have much, much larger storage capacities thanks to never-cheaper cards. All this means the back-up takes a long time. So I wondered if I could create a gadget to tell me the task was done, allowing me to get on with other jobs in the meantime.

Continue reading