Here are instructions to reproduce my development environment on macOS, along with all my dotfiles.
Check out the companion blog post: Your dev environment is your ideal supermarket.
After the first boot, perform all the possible OS updates:
- install major and minor upgrades in
System Settings > Software Updates
, then reboot and check again until there are no more updates - in terminal, install XCode command line tools:
xcode-select --install
- check again
System Settings > Software Updates
and install updates if available, then reboot again. Repeat until there are no more updates. System Settings > Privacy & Security > FileVault
: clickTurn On FileVault
then set a recovery key and save it in password manager
Create workspace directory:
mkdir workspace
Configure Mac settings:
Appearance
: setShow scroll bars
toAlways
Lock Screen > Turn display off on ...
: turn display off after 20 min on battery, after 1h for power adapterTrackpad > Scroll & Zoom
> uncheckScroll direction: Natural
Keyboard > Text Input > Edit...
then disable "Use smart quotes and dashes"Keyboard
: setKey Repeat
to fastest andDelay until Repeat
to shortestKeyboard
>Keyboard Shortcuts
Input Sources
: uncheckSelect the previous ...
andSelect the next ...
Keyboard
>Move focus to active or next window
: pressCMD + <
Mouse > Tracking speed
: set to 3rd cursor from the rightDesktop & Dock
: set a small size, setPosition on screen
toright
and setAutomatically hide and show the Dock
- remove all optional icons from Dock
Desktop & Dock > Keyboard and Mouse Shortcuts
: deactivateALT-DOWN
(Mission Control) andALT-UP
(Application windows) by replacing them with-
Control Centre > Battery
: Show PercentageScreenshot
app: go toOptions > Save to
and selectOther location
, then create folder in~/workspace
calledscreenshots
and put it thereFinder
app: go toSettings > Advanced
and checkShow all filename extensions
, add home directory to Favourites, runmkdir ~/dailydirs
and adddailydirs
to Favourites
Populate iTomate config file:
nano ~/.itomate.yml
version: "1.0"
profile: "pwalch profile"
tabs:
workspace:
root: "~/workspace"
title: "workspace"
panes:
- position: "1/1"
Install Brew:
-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
close and re-open Terminal
-
brew install --cask iterm2
-
close Terminal app and open iTerm app
-
System Settings > Privacy & Security > Privacy > Full Disk Access
: add iTerm fromApplications
directory -
generate SSH key
ssh-keygen -t ed25519 -C "$(date "+%Y%m%d")-DEVICE-NAME"
-
brew install zsh-completions tmux
-
install tmux Powerline font: GitHub link
-
Settings > General > Magic
and checkEnable Python API
-
Settings > Appearance > Dimming
setDimming amount
to 15 -
Settings > Profiles > Text
and selectFira Mono for Powerline
-
Settings > Profiles > Keys
and do(...) Presets...
thenNatural Text Editing
, thenRemove
, then and press+
then setKeyboard shortcut
toOPTION+SPACE
,Action
toSend text
and the text below to -
Settings > General > Selection
: checkApplications in terminal may access keyboard
-
Settings > Keys > Key Bindings
- set
Next Pane
toCMD+j
- set
Split Vertically with Profile
(Default) toCMD+k
- set
Split Horizontally with Profile
(Default) toCMD+l
- set
New Tab with "Default" Profile"
toCMD+t
- set
Scroll One Line Up
toCMD+up
- set
Scroll One Line Down
toCMD+down
- set
Previous Tab
toALT+CMD+LEFT
andCMD-UP
- set
Next Tab
toALT+CMD+RIGHT
andCMD-DOWN
- set
-
Settings > Keyboard > Keyboard Shortcuts > App Shortcuts
, add a new item with applicationiTerm.app
with menu titleRestart Session
and set shortcutCMD+SHIFT+R
-
iTerm2 > Install Shell Integration
and follow instructions -
install oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- potential nice theme
curl -sL https://raw.githubusercontent.com/moarram/headline/main/headline.zsh-theme -o ~/.oh-my-zsh/themes/headline.zsh-theme ZSH_THEME="headline"
-
close and re-open terminal
-
install some oh-my-zsh extensions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/MichaelAquilina/zsh-you-should-use.git $ZSH_CUSTOM/plugins/you-should-use
-
close and re-open terminal
-
cd ~
-
install Tmux and gpakosz
git clone https://github.com/gpakosz/.tmux.git
ln -s -f .tmux/.tmux.conf
-
apply
chezmoi
sh -c "$(curl -fsLS git.io/chezmoi)" -- init --apply pwalch
Install all Brew Cask applications and start each of them for the first time:
brew install --cask google-chrome firefox \
rectangle flycut notunes caffeine \
visual-studio-code pycharm-ce docker git-lfs \
thunderbird obsidian vlc gimp zoom libreoffice \
tailscale
- Rectangle: start app and set up permissions, set shortcuts for left/right half, next/previous display and fullscreen, launch on login
- Chrome
- make default browser, disable form autofill and password management, install
uBlock Origin
and1Password
Settings > Privacy and security > Security > Scroll to bottom
: toggleAlways use secure connections
- in
Settings > Keyboard > App Shortcuts
, setSelect Previous Tab
toCMD-UP
Select Next Tab
toCMD-DOWN
,Move Tab to New Window
toCMD-D
- start a meeting on Google Meet and try to get audio, video and share screen, which will trigger permissions request and require restarting the app
- make default browser, disable form autofill and password management, install
- Firefox
- make default browser, disable password autofill, install
uBlock Origin
extension Privacy & Security > Passwords
uncheckAsk to save passwords
Privacy & Security HTTPS-Only Mode
selectEnable HTTPS-Only mode in all windows
- make default browser, disable password autofill, install
- Flycut: start app and set up permissions, set shortcut to CMD + SHIFT + K, check
Move pasted item to top of stack
,Privacy & Security > Privacy > Accessibility
add Flycut, launch on login by going to "Login Items" and adding "Flycut.app" (TermiT/Flycut#206) - Thunderbird: set up email accounts
- Gmail:
imap.gmail.com:993
,smtp.gmail.com:993
with email address as user name and application password as password - in account settings in
Copies & Folders
, checkBcc these email addresses
with the email address of the account so all sent messages go to the inbox
- Gmail:
- Zoom
- log in, start a meeting and try to get audio, video and share screen, which will trigger permissions request and require restarting the app
- in
Background & Effects
and enable virtual background - in
Audio
checkAutomatically join computer audio when joining
andMute my mic when joining
- in
Video
checkStop my video when joining
- in
PMI Settings
(appears when clicking on down-arrow next toNew Meeting
button), checkWaiting Room
andMute participants upon entry
- disable audio and video when starting a meeting
- PyCharm: start app and set it up
- GIMP: start app as it takes longer the first time
- noTunes
- start noTunes app and accept to open
System Preferences > Login Items
inOpen at Login
add noTunes
VS Code:
- in macOS System Settings, go to
Privacy & Security > Privacy > Full Disk Access
then addVS Code
Settings > Profile
thenImport Profile...
- import profile from
pwalch.code-profile
in the repo
Notes about profile:
"key": "cmd+[Backslash]"
is actually '#', not backslash- various points of interest
workbench.action.previousEditor
workbench.action.nextEditor
viewContainer.workbench.view.explorer.enabled
explorer.openAndPassFocus
workbench.action.splitEditorRight
brew tap pwalch/lonesnake
brew install \
micro bat sd the_silver_searcher ripgrep up \
fd eza tree broot ranger highlight fzf zoxide \
direnv git-lfs diff-so-fancy lazygit shellcheck mosh \
nvm lonesnake \
coreutils procs dust ctop lazydocker viddy \
wget cowsay ffmpeg ipmitool awscli docker-credential-helper-ecr \
jless p7zip
micro ~/.config/micro/settings.json
{
"tabstospaces": true
}
micro ~/.config/micro/bindings.json
(Ctrl-d solves the issue with backspace duplicating the line)
{
"Alt-/": "lua:comment.comment",
"CtrlUnderscore": "lua:comment.comment",
"Ctrl-d": "Delete",
"AltShiftUp": "SpawnMultiCursorUp",
"AltShiftDown": "SpawnMultiCursorDown",
"AltUp": "MoveLinesUp",
"AltDown": "MoveLinesDown",
"CtrlUp": "DuplicateLine",
"CtrlDown": "DuplicateLine"
}
micro ~/.config/ranger/rc.conf
copymap <UP> k
copymap <DOWN> l
copymap <LEFT> j
copymap <RIGHT> é
Node
nvm install 18
Python
cd ~
lonesnake
- close and re-open terminal
- check that
which python
points to~/.lonesnake/venv/bin
(this should be done by zshrc_custom) ~/.lonesnake/venv/bin/pip install pipx
for PACKAGE in itomate thefuck httpie magic-wormhole black isort flake8; do pipx install "$PACKAGE"; done
AWS
- install AWSCLI with tutorial
aws configure
and enter default keysmkdir -p ~/.docker && echo '{"credsStore": "ecr-login"}' > ~/.docker/config.json
- workaround for Docker for Mac issue
alias docker-configure-ecr="mkdir -p ~/.docker && echo '{\"credsStore\": \"ecr-login\"}' > ~/.docker/config.json"
- enter Power User Mode:
PROGM + SHIFT + ESC
- enable/disable virtual drive:
PROGM + F1
state.txt
startup_file=p_qwerty.txt
key_click_tone=ON
toggle_tone=ON
macro_disable=OFF
macro_speed=3
status_play_speed=3
power_user=true
v_drive_open_on_startup=off
p_qwerty.txt
{=}>{speed8}{-lshift}{=}{+lshift}{space}
{lshift}{=}>{speed8}{=}
{caps}>{speed8}{-lctrl}{z}{+lctrl}
[lctrl]>[rctrl]
[lalt]>[lalt]
[ralt]>[rctrl]
[rctrl]>[lalt]
[delete]>[lwin]
[end]>[delete]
{home}>{speed8}{-lshift}{2}{+lshift}
Tips
- on virtual keyboard, rctrl points to left CTRL key
- in Kinesis config file, rctrl corresponds to the expected CTRL-RIGHT key
- LeftOpt and RightOpt lead to the same key in virtual keyboard
- known correspondances between physical keyboard and Kinesis key names
- STRG LEFT =>
lctrl
- ALT LEFT =>
lalt
- ALT GR =>
ralt
- STRG RIGHT =>
rctrl
- STRG LEFT =>
optional paging replacement
{pup}>{speed8}{up}{up}{up}{up}{up}{up}{up}{up}{up}{up}
{pdown}>{speed8}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}