Setting up a new computer
These are my notes on the tasks or apps I frequently use and setup on a new or refreshed computer.
Desktop Backgrounds¶
Forest originally from uhdpaper.
Install fonts¶
For Mac, just unzip the fonts and double click each file to add it to Font Book.
Apps to Install¶
Install git¶
Type the following into terminal:
Python Things¶
Install uv
Install just
Go Things¶
Install pkgsite
Install godoc
Run locally withgodoc -http=:7000
Install gofumpt
Update VS Code settings:
zsh Things¶
Starship prompt¶
Install it
Add the following to the end of ~/.zshrc:
zsh auto-suggestions¶
https://github.com/zsh-users/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
echo "source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc
zsh syntax highlighting¶
https://github.com/zsh-users/zsh-syntax-highlighting
# Clone this repository and source the script
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting
echo "source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc
Set up global gitignore¶
Edit the .gitconfig file
Add the lines:
Save the file and then create/open a.gitignore file
Add anything that should be ignored for all projects. For example:
Set up "permanent" environment variables¶
(provided by OpenAI's ChatGPT)
macOS¶
Use nano to add export MY_VARIABLE=my_value to one of the following:
- If you are using Bash shell, you can use ~/.bashrc
- If you are using Zsh shell, you can use ~/.zshrc. Here’s how:
Load the new environment variables by running:
- source ~/.zshrc
- source ~/.bashrc
Install Air¶
Air is a useful tool for live reloading applications.
Installation:
Make sure GOPATH is set in ~/.zshrc to be able to use the air command
# Go Path Things
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
export PATH=$PATH:$(go env GOPATH)/bin
Archive¶
pyenv¶
https://github.com/pyenv/pyenv#automatic-installer
# pyenv automatic installer
curl https://pyenv.run | bash
# Set up pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.zshrc
# Set up global pyenv virtual env
pyenv install 3.11.2
pyenv virtualenv 3.11.2 3.11.2-global
pyenv global 3.11.2-global