Hello World

My first blog post
December 30, 2020
macbook config

This is the first entry in this blog. I’m still trying to setup and understand Hugo, but since I’m here I guess I should share at least some tip.

I’m also setting up the new Macbook Air, and it seems that you need to manually specify whether to run an app with Rosetta (the x86_64 to arm64 translator) or not. As I’m going to be using both things, I duplicated the Terminal app, changed its name and icon (I had to do something silly with sips and iconutil), and set one with the option (go to Finder -> Applications -> Utilities, right click and Get Info, and set “Open using Rosetta”). After that we have 2 different shells: one running native arm64, and the other emulated x86_64. So I added these lines to my ~/.zshrc file:

function isRosetta() {
	uname -a | grep -q x86_64
	return $?
}

if isRosetta; then
	source ~/.zshrc_x86_64
else
	source ~/.zshrc_arm64
fi

It seems that some software still resists to be emulated, and other (like Homebrew) still has no support for arm64. This should allow me to keep track of those things more easily.

Note to myself: The right way of doing this might be to use the arch command, but it’s too late now.