title |
---|
MacOS Laptop Setup |
Warning: This repository is deprecated. See my dotfiles repo instead.
A repo to host config files and notes about the setup of my Mac Pro laptop at Shopify
-
Configure the laptop for the Shopify environment as per the documentation
-
Install
oh-my-zsh
:sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
-
Install
dev
:eval "$(curl -sS https://up.dev)"
dev
installshomebrew
, no need to install it manually. -
Install
gcloud
SDK, including thecloudplatform
repo and setup scripts:dev clone cloudplatform dev up
-
Clone this repository
The following are packages I installed explicitly using homebrew
:
Package | Comment |
---|---|
bat | A supercharged cat |
emacs | The real text editor (see section below) |
exa | Alternative to ls |
fd | Fast alternative to find |
gh | The GitHub CLI |
git | The latest git (apple's is outdated) |
glow | Render markdown on the CLI |
htop | Interactive process viewer |
jump | Quick dir navigator |
k9s | A terminal-based UI to interact with Kubernetes (1) |
kind | A tool for running local Kubernetes clusters |
kitty | A lightweight terminal emulator |
krew | The plugin manager for the kubectl command-line tool |
kubectx | kubectl context/namespace switch tool |
lazygit | A simple terminal UI for git commands (2) |
lua | An embeddable scripting language |
micro | Because I don't like vi ! (3) |
most | Fancy pager |
nmap | A utility for network discovery and security auditing |
nnn | A terminal file manager (4) |
rg | A replacement for grep |
rustup | The rust compiler and tools (5) |
tmux | The terminal multiplexer |
(1) install with
brew install derailed/k9s/k9s
(2) install with
brew install jesseduffield/lazygit/lazygit
(3) install the Go plugin with
micro -plugin install go
(4) install plugins with
curl -Ls https://raw.githubusercontent.com/jarun/nnn/master/plugins/getplugs | sh
(5) run rustup-init
to install the compiler. Verify with rustc --version
-
Run the following command to install the packages:
brew install bat exa fd gh git glow htop jump kind kitty krew kubectxlua \ micro most nmap nnn unzip rg rustup tmux
-
Change dir to this repo's clone and run the script
./config.sh
to set up all the required config files -
Log out from all terminals and open a new one (try
kitty
!)
Install Emacs using homebrew for use on the terminal only.
brew install emacs
brew link emacs
Install Emacs Prelude which
provides a sensible and well documented setup on top of a default
Emacs installation. Make sure you do not have any ~/.emacs
file or
~/.emacs.d
folder present to start with.
mkdir ~/src/github.com/bbatsov
git clone git://github.com/bbatsov/prelude.git ~/src/github.com/bbatsov/prelude
ln -s ~/src/github.com/bbatsov/prelude ~/.emacs.d
cd ~/emacs.d
cp sample/prelude-modules.el personal
You can then customize the personal
directory as you wish and update
prelude
by running git pull
.
Alternatively, you can keep the personal
folder in this repo under
version control, and soft-link it to your ~.emacs.d
folder:
cd ~/emacs.d
git checkout -b pirivan
rm -rf personal
ln -s <this-repo-dir>/.emacs.d/personal ~/.emacs.d
I run Emacs as a daemon and use emasclient
as the editor for faster
startup times. To run Emacs as a daemon upon login:
ln -s /opt/homebrew/Cellar/emacs/27.2/homebrew.mxcl.emacs.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.emacs.plist
I defined the ec
alias in .zshrc
to start the client in a terminal window.
Note: Changes to the configuration won't take effect unless you restart the Emacs daemon:
emacsclient -e '(kill-emacs)'
MacOS restarts the daemon automatically.