Skip to content

Instantly share code, notes, and snippets.

@tuananhlai
Last active December 1, 2025 07:02
Show Gist options
  • Select an option

  • Save tuananhlai/be5b96f79b5d8b1ecce4de8ab53603af to your computer and use it in GitHub Desktop.

Select an option

Save tuananhlai/be5b96f79b5d8b1ecce4de8ab53603af to your computer and use it in GitHub Desktop.
#!/bin/zsh
echo "🖥️ Mac Setup Script"
echo "===================="
# Ask if this is a company machine
echo ""
echo "Is this a company-issued machine? (y/n)"
read is_company_machine
echo ""
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Common applications for all setups
echo "Installing common applications and tools..."
brew install --formula mycli pgcli gh neovim nvm opentofu awscli kubectl go
brew install --cask httpie plex discord anki docker visual-studio-code warp notion firefox@developer-edition google-chrome raycast spotify ticktick zed cursor scroll-reverser
# Install company-specific applications if selected
if [[ $is_company_machine =~ ^[Yy]$ ]]; then
echo "Installing company-specific applications..."
brew install --cask slack figma zoom
fi
# Setup Node.js environment
echo "Setting up Node.js environment..."
nvm install --lts
npm i -g pnpm yarn
# Install LazyVim (download preconfigured NeoVim settings)
git clone https://github.com/LazyVim/starter ~/.config/nvim
# System preferences
echo "Configuring system preferences..."
# Disable MacOS press and hold behavior for better Vim navigation.
defaults write -g ApplePressAndHoldEnabled -bool false
# Disable CapLock delay
# https://www.reddit.com/r/MacOS/comments/1dkklgs/how_to_remove_caps_lock_key_delay/
hidutil property --set '{"CapsLockDelayOverride":0}'
# Swap function key.
# Install omz: sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Setup Raycast: https://manual.raycast.com/the-basics
# Auto-hide the dock "Automatically show and hide the Dock"
# Disabled "Tiled windows have margins"
# Remove all global actions hotkey from TickTick.
# Disable "Add period with double-space"
# Disable "Displays > Advanced > Push through the edge of a display..." to prevent cursor freezing at the edge of the screen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment