Setting up Fish on the Mac
Fish shell is my shell of choice and having it setup
as default on the Mac requires some extra steps.
When homebrew is installed, run
brew install fish.
After that, edit
/etc/shells and add fish to it:
# sudo edit /etc/shells
Add the bottom of the file add:
Then set the shell as default with:
chsh -s /opt/homebrew/bin/fish
It does require logging again to be activated.
Crisp fonts on Alacritty
I’m using Alacritty on the Mac and I noticed how the
font rendering is much thicker than I’m used to on iTerm. On iTerm I use the
“thin strokes” setting, which is not available in Alacritty.
Turns out, you can set it with:
defaults write org.alacritty AppleFontSmoothing -int 0
If you then log in and logout again, your Alacritty will be similar to the
crispness you find in iTerm.
Some people like to have this kind of crispness across the entire OS. If you
are one of them:
defaults write -g AppleFontSmoothing -int 0
Faster key repeat on the Mac
I like to have my key repeat set high, because I still browse my code line,
by line; yes, I know there are better ways to browse.
On the Mac, if you go through the “System Preferences”, there is only so much
you can do. Luckily, you can get the right settings if you use the terminal.
First, make sure that you have disabled “Slow keys” in “System Preferences > Accessibility > Keyboard > Slow keys”.
Then go into your Terminal of choice and type:
defaults write -g KeyRepeat -int 1
defaults write -g InitialKeyRepeat -int 12
The normal minimum of
KeyRepeat is 2. Setting it to 1 will have a key repeat
delay of 15ms.
InitialKeyRepeat, the minimum is 10; 15 if you use system settings. I
prefer to set it to 12.
If you want to restore the defaults, just go through the system settings and set
it to a value you prefer.
Installing Clojure on a Mac
I had to set up a new laptop recently, and one of the first things you install on a new laptop is Clojure.
Below is the setup I used and which got me started quickly. First, you must install Homebrew as a package manager.
Second, we also need Java, and the best option out there is supplied by Adoptium, which has pre-built OpenJDK binaries for you. Go to the website and download the latest LTS release if you want to be safe, or download the newest version (19 as of writing this) if you’re going to live on the edge.
After that, install Clojure is one command away:
brew install clojure/tools/clojure
clj on the command line, and when running for the first time, it will download the required packages and give you access to the REPL.
Now, for starting and managing projects,
neil is an amazing new CLI which can help you do that. Install it with:
brew install babashka/brew/neil
Install Emacs on the Mac
There are many ways to install Emacs on the Mac, from pre-build
Applications, to Homebrew, to installing from source.
My current favorite way to get the latest Emacs which has some
additional stuff for the Mac is by using a build script, which builds
Emacs from its source.
It’s called build-emacs-macos and is on Github. The instructions to use it are here in the README.