An opinionated terminal experience
As I got a new work laptop (Macbook Pro M1) recently, I’ve recorded the steps I did to get it to behave as I want, and hopefully, be a little bit more productive. (I’m very aware of the delicate balance between spending time on being more productive and actually being productive)
It all starts with homebrew. as most of the other stuff is installed via brew.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Now I install a font to use within the terminal, that works with the theme I’ll select later
brew tap homebrew/cask-fonts
brew install font-hack-nerd-font
This is the Powerline Hack font but enhanced with font-awesome icons
Now for the Terminal itself, I like Iterm2 for its configurability and the fact that it can have a screen slide down from the top, much like the terminal in Quake.
After installing, I go to the profiles sections and add a new profile, where I select “Full width, top of the screen in windows -> Style and enable a hotkey (in my case double-tap ctrl)
And in both profiles, I set the font to ‘hack nerd font mono’ and change the dark blue colour to a lighter one, as the darker one is hardly readable on a block background
Now for the shell, I like fish and by installing the oh-my-fish framework I can then add the agnoster theme.
brew install fish
curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish
omf install agnoster
Now I install lsd (ls deluxe) which gives me icons for filetypes and different shades of green depending on how old or new the files are the Hack Nerd font is needed here for the icons
brew install lsd
And I add the following aliases to the aliases.fish file in ~/.config/fish
alias ls='lsd'
alias ll='lsd -la'
Then I install fig to have the best AI powered autocomplete there is
brew install fig
I also add some helper functions in fish to make life a bit easier, these are just a few examples, I have loads more
function mcd -d "make and change into directory"
set -l dir $argv[1]
mkdir -p $dir; and cd $dir
end
function reload -d "reload fish and omf"
echo "Reloading fish config"
source ~/.config/fish/config.fish
echo "Reloading omf"
omf reload
end
function urlencode -d "URL Encode any arguments"
perl -MURI::Escape -le "print uri_escape('$argv')"
end
In the end it looks like this:
Hopefully I showed you some things, that might make your commandline experience a bit more pleasurable.