sciolism

Playing around with technology

ten.fifteen: Catalina

A couple of days after the release of macOS 10.15.2 I decided to upgrade my primary working machine to macOS Catalina. While I could find a lot of evidence on several Apple related websites that the upgrade caused issues for many users, a dry run on a testing system made me rather optimistic that the upgrade will run smoothly for me. However, after upgrading I stumbled across two issues which I had to resolve.

Sanitized QuickLook Plugins

For the purpose of having previews of syntax-highlighted source code files I have used QuickLook plugins1 for ages. One plugin which does an excellent job here is QLColorCode. However, right after the upgrade instead of syntax-highlighted previews of source code files, I was prompted with the following alert when using QuickLook:

QLColorCode cannot be opened because the Developer cannot be verified.

While the actions on the alert window are not really helpful, the alert seemed familiar to me. A similar warning appears if you have downloaded an application and open it for the first time. The warning is caused by the extended attribute com.apple.quarantine which is set by macOS on downloaded application from sources other then the App Store to guide the user. Well, thank you very much for making me aware macOS but I want to get rid of this warning and use my plugins. ☝🏻

To do so open a Terminal window and remove the attribute com.apple.quarantine with the help of the program xattr (you may need to adjust the pathway to your plugin file):

xattr -dr com.apple.quarantine ~/Library/QuickLook/QLColorCode.qlgenerator

After that we need to reload the QuickLook generators list:

qlmanage -r

You should now be able to use your QuickLook plugin again.

Upgrading the “auto” appearance option with dynamic wallpapers

I have always been a fan of the dark mode introduced with macOS 10.14 Mojave. Until Catalina I have relied on an Alfred workflow (basically an AppleScript) in combination with a launchd entry to (automatically) toggle the appearance and switch my wallpaper. With Catalina having a build-in option to automatically toggle the appearance the workflow was redundant – or at least parts of it: an option to automatically switch the wallpaper is missing. Since a dark appearance with a bright wallpaper is only half the fun I needed to find a solution for this.

Luckily there is an onboard solution which Apple originally introduced in Mojave: dynamic wallpapers. In a nutshell the idea is to have an wallpaper/image file which features an individual image for light and dark appearance. Several default dynamic wallpapers are shipped with macOS Mojave/Catalina but of course we want to use our own wallpapers here.

Apple uses HEIF-files for dynamic wallpapers. After a quick search I came across Marcin Czachurski’s command-line application wallpapper which is capable of building dynamic HEIF-files. It can be easily installed using Homebrew. The next steps were already described by Marcin so I skip the explanation here. Following these steps will create a dynamic wallpaper that automatically switches according to your appearance setting. Using this newly created wallpaper together with the auto appearance setting will let macOS automatically switch your appearance and wallpaper simultaneously.


  1. If you are looking for useful QuickLook plugins, Sindre Sorhus has composed a list with some suggestions. ↩︎

Article info