Skip to content

Latest commit

 

History

History
323 lines (199 loc) · 12.8 KB

setup-mac.md

File metadata and controls

323 lines (199 loc) · 12.8 KB

Setup Mac

This page guides you to set up the new machine to usual state.

1. Built-in Software / OS Preferences

Finder

System Settings

/ Guides
Appearance
Accessibility
Control Center
Desktop & Dock
Displays
Touch ID & Password
Keyboad
Trackpad
Mouse

2. Hardware

3. Developments

Let's configure a development environment through a console. At this time, the console app which is pre-installed is only Terminal.app by default. So you need to use it to set up these configurations.

Prerequisites

Install Git.

xcode-select --install

Install Rosetta 2.

sudo softwareupdate --install-rosetta

Connections for GitHub

Check your keys in .ssh folder.

$ ls ~/.ssh
id_rsa id_rsa.pub

If you don't have them, create key pairs with the command. (all questions are compulsory but it's OK to leave it blank these)

cd ~/.ssh && ssh-keygen -t rsa -C "babarot@gmail.com"

Copy a public key.

cat ~/.ssh/id_rsa.pub | pbcopy

Next,

  1. Go to https://github.com/settings/ssh/new
  2. Paste the public key to the text area
  3. Confirm to OK or not: ssh -T git@github.com

Let's check the connectivity for your GitHub account is working. It goes well if your account name is just displayed.

$ ssh -T git@github.com
Hi babarot! You've successfully authenticated, but GitHub does not provide shell access.

Dotfiles

The first thing you need to do is to clone this repo into a location of your choosing. For example, if you have a ~/Developer directory where you clone all of your git repos, that's a good choice for this one, too. This repo is setup to not rely on the location of the dotfiles, so you can place it anywhere.

git clone git@github.com:babarot/dotfiles.git ~/src/github.com/babarot/dotfiles
cd ~/src/github.com/babarot/dotfiles && make install

The make install will create symbolic links from the dotfiles directory into the $HOME directory, allowing for all of the configuration to act as if it were there without being there, making it easier to maintain the dotfiles in isolation.

AFX/Zsh

afx is a CLI packages (tools, shell plugins, etc) manager. Almost all ZSH configurations are also related to the afx settings, so once you run afx install and then relaunch your shell, you can enter the CLI world in the usual state of your shell.

curl -sL https://raw.githubusercontent.com/babarot/afx/HEAD/hack/install | bash
afx install

References:

Homebrew

Almost all apps except for CLI tools (commands/plugins, etc...) are managed by Homebrew (package manager for macOS).

Install brew command.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Install apps based on this list: Brewfile.

brew bundle

References:

Tip

Some apps are managed via mas-cli/mas (Mac App Store command line interface). Sometimes, the installation by brew bundle is failed by various reasons. The most mainly reason for the installation failing is the app is already installed by the organization of Mac owner or the app listed on Mac App Store has been already deleted. In such a case, it is recommended that you install them individually through mas command manually as follows.

(List installed apps via mas)

mas list

(Install an app via mas)

mas install <appid>

Tmux

tmux will be installed via Brew. After installed, run tmux and press prefix + I on tmux to install plugins.

Go

Note

This step may become done by brew (Brewfile). If so, no longer needed to run this step.

  1. Go to https://go.dev/dl/
  2. Install via the installer

References:

Some migrations

History (Z shell)

cp ~/.zsh_history PATH

History (directory changes)

I use enhancd to jump a directory. A history of directory changes is enhancd.log file.

cp ~/.enhancd/enhancd.log PATH

GitHub repositories

open ~/src/github.com/babarot

3. Configure Apps

1Password

https://1password.com/

Log in with Setup Code (this is most easier among these methods).

Configure the appearance.

Google Japanese IME

https://www.google.co.jp/ime/

iTerm2

https://iterm2.com/

Install a colorscheme

https://ethanschoonover.com/solarized/

Configure

Area Guides
General
Appearance
Profile

Obsidian

https://obsidian.md/

Setup Obsidian account and Vault.

Enter encryption password.

Run sync.

Enable Vimrc Support plugin

cp /path/to/.obsidian.vimrc ~/Documents/(Obsidian Vault)

Things 3

https://culturedcode.com/things/

Turn on Things Cloud.

CleanShot X

https://cleanshot.com/

PopClip

https://www.popclip.app/

Install extensions from https://www.popclip.app/extensions/

Spark

https://sparkmailapp.com/

Log in.

Spotify

https://open.spotify.com/

Log in.

Hidden Bar

https://github.com/dwarvesf/hidden

Magnet

https://magnet.crowdcafe.com/

MeetingBar

https://meetingbar.app/

Paste

https://pasteapp.io/

Yoink

https://eternalstorms.at/yoink/mac/